Hi!
I Think the problem is not the nil parameter
The number of Written bytes parameter is DWord, not integer
so try to definie I as "var i:DWord;" instead of integer
Here is the API declaration for WriteFile
The BOOL WriteFile(
HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped
);
: I need a bit of help converting a older bit of delphi 3 code to work with delphi 7
:
: here the error I get:
: Types of actual and formal var parameters must be identical
:
:
: procedure WriteUserData(ru:PRegUser);
: var i:Integer;
: begin
: SetFilePointer(userdb,RegUsers.IndexOfObject(TObject(ru))*soru,nil,FILE_BEGIN);
: WriteFile(userdb,ru^,soru,i,nil); // Nil is the problem code.
: FlushFileBuffers(userdb);
: end;
:
:
: can anyone help?
:
: thanks alot
: Slewis
: