archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • Tony Christiansen wrote 1 explain what a working media change line is Is it hardware software etc so I can explain to the user It is a hardware feature a disk drive can have If present the drive can signal to the drive controller that a media change occurred the controller informs the driver and the driver sends a WM DEVICECHANGE message around to inform any interested parties of the

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1201.txt (2016-02-14)
    Open archived version from archive



  • If file cannot be deleted then the disk is write protected or possibly the media is absent RESULT NOT DeleteFile TempName END FINALLY SetErrorMode ErrorMode END END IsDiskWriteProtected Assumes non proportional Terminal font in TMemo Limited to 2 GB values in D3 no limit in D4 PROCEDURE ShowDrives CONST MemoInfo TMemo VAR DriveBits SET OF 0 25 DriveIndex INTEGER DriveLetter CHAR DriveType TDriveType NotUsed DWORD Use DWORD for D3 D4

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/IO/ShowDrives.TXT (2016-02-14)
    Open archived version from archive


  • BROADCAST HDR DBT DEVTYP OEM 00000000 OEM or IHV defined DBT DEVTYP DEVNODE 00000001 Devnode number DBT DEVTYP VOLUME 00000002 Logical volume DBT DEVTYP PORT 00000003 Port serial or parallel DBT DEVTYP NET 00000004 Network resource media types in DBT DEVTYP VOLUME DBTF MEDIA 0001 change affects media in drive DBTF NET 0002 logical volume is network volume TYPE Instead of TMessage use this TWMDeviceChange RECORD Msg Cardinal Event UINT

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/IO/Dbt_h.pas.txt (2016-02-14)
    Open archived version from archive


  • to write to an external text file Try to use TFileStream Streams are much more powerful and they are more natural in Delphi While TFileStreams are the contemporary way to do this AssignFile should still work This works fine on my network Do you have some sort of network permission issue procedure TForm1 ButtonWriteClick Sender TObject VAR LogFile TextFile begin AssignFile LogFile earlg2 c temp Sample Txt Rewrite LogFile WriteLn

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0328a.txt (2016-02-14)
    Open archived version from archive


  • for record size in the assign function is something larger than 1 I don t know the exact value Hope that helps Erwin Erik Ulven wrote in message Hello I know there is a simple solution to my problem but it has not come to my head yet Im storing data in binary files and i read and write with BlockRead BlockWrite But i had to change the recordsize These

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0512c.txt (2016-02-14)
    Open archived version from archive


  • LabelStatus Caption CRC Check OK ELSE LabelStatus Caption CRC Check Failed GroupBoxSentinel Enabled TRUE end procedure TForm1 ButtonCountClick Sender TObject VAR ByteCount INTEGER BytesRead INTEGER error INTEGER FromFile FILE i INTEGER IntegerBuffer TIntegerBuffer IntegerCount INTEGER IOBuffer TByteBuffer SentinelCount INTEGER TotalBytes INTEGER begin FileMode 0 Turbo default is 2 for R W 0 is for R O AssignFile FromFile Paramstr 0 I RESET FromFile 1 I error IOResult IF error 0 THEN BEGIN SentinelValue StrToInt EditSentinel Text New IOBuffer Allocate the Buffer ByteCount 0 IntegerCount 0 SentinelCount 0 REPEAT BlockRead FromFile IOBuffer SizeOf TByteBuffer BytesRead IntegerBuffer Addr IOBuffer FOR i 0 TO BytesRead DIV 4 1 DO BEGIN INC IntegerCount IF IntegerBuffer i SentinelValue THEN INC SentinelCount END INC ByteCount BytesRead UNTIL BytesRead 0 Closefile FromFile Dispose IOBuffer Free the Buffer END LabelHex Caption Hex IntToHex SentinelValue 2 SizeOf INTEGER LabelCount Caption Bytes IntToStr ByteCount Integers IntToStr IntegerCount Sentinels IntToStr SentinelCount end procedure TForm1 ButtonPatchEXEClick Sender TObject VAR BytesRead INTEGER error1 INTEGER error2 INTEGER FromFile FILE i INTEGER IntegerBuffer TIntegerBuffer IOBuffer TByteBuffer ReplaceFlag BOOLEAN SentinelCount INTEGER ToFile FILE begin FileMode 0 Turbo default is 2 for R W 0 is for R O AssignFile FromFile Paramstr 0 I RESET FromFile 1

    Original URL path: http://www.efg2.com/Lab/Library/Delphi/IO/PatchEXE.TXT (2016-02-14)
    Open archived version from archive


  • VarArrayLoadFile to load a bitmap file into a variant array which is the state I believe you are in with the return from your ocx I then load the array into a memory stream as a TBitmap has a LoadFromStream method In this case I had an array containing the whole bitmap ie header and pixel data If your variant array contains just the pixel data you will need to do two writes to the stream the first to write the bitmap header and the second as below to write the pixel data Bob function VarArrayLoadFile const FileName string Variant var F file Size Integer Data Pointer begin AssignFile F FileName Reset F 1 try Size FileSize F Result VarArrayCreate 0 Size 1 varByte Data VarArrayLock Result try BlockRead F Data Size finally VarArrayUnlock Result end finally CloseFile F end end procedure TForm1 Button1Click Sender TObject var vArray Variant iSize LongInt mStream TMemoryStream Bmp TBitmap buffer Pointer begin Load bitmap into variant array vArray VarArrayLoadFile CHEMICAL BMP Calculate size of array iSize VarArrayHighBound vArray 1 VarArrayLowBound vArray 1 1 Get a pointer to the array buffer buffer VarArrayLock vArray try Create stream mStream TMemoryStream Create try Preset stream size mStream

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1222c.txt (2016-02-14)
    Open archived version from archive


  • to but that ll be later If anyone knows of something like it that already exists please tell me and save me the development time Thanks Walter unit TextRead TextRead a simple Seek access to text files in read mode By and copyright by Walter Kenaston 7 July 2000 define D4 when Delphi version is 4 0 or greater interface procedure AssignText var T text FName String function FilePosText var T text cardinal procedure SeekText var T text const N cardinal implementation uses Windows SysUtils const PosSize SizeOf cardinal lpIndex 1 function TextInput var t TTextRec integer var bval boolean ifdef D4 NumToRead cardinal NumRead cardinal else NumToRead integer NumRead integer endif pOverlap POverlapped l cardinal begin with t do begin NumToRead t BufSize pOverlap nil bval ReadFile t handle t BufPtr NumToRead NumRead pOverlap if not bval then begin result GetLastError exit end result 0 BufPos 0 move UserData lpIndex l PosSize l l BufEnd move l UserData lpIndex PosSize BufEnd NumRead end end function TextIgnore var t TTextRec integer begin result 0 end function TextClose var t TTextRec integer begin CloseHandle t handle t Mode fmClosed result GetLastError end function TextOpen var t TTextRec integer var ifdef D4 DAccess cardinal ShareMode cardinal pSecurity PSecurityAttributes CreatDist cardinal FlagsnAttr cardinal HTempl cardinal else DAccess integer ShareMode integer pSecurity PSecurityAttributes CreatDist integer FlagsnAttr integer HTempl integer endif begin result 1 with t do begin if t Mode fmInput then begin t InOutFunc TextInput t FlushFunc TextIgnore t CloseFunc TextClose DAccess GENERIC READ ShareMode FILE SHARE READ pSecurity nil CreatDist OPEN EXISTING FlagsnAttr FILE ATTRIBUTE READONLY HTempl 0 t Handle CreateFile t Name 0 DAccess ShareMode pSecurity CreatDist FlagsnATtr HTempl if t handle INVALID HANDLE VALUE then begin result GetLastError exit end else begin t BufPos 0 t BufEnd 0 FillChar t

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2000/0607b.txt (2016-02-14)
    Open archived version from archive



  •