1
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by 440bx on Today at 12:18:07 am »By looking how microsoft has designed it to be.And the definition of WriteFile you showed violates the advice you gave.
function WriteFile(hFile: THandle; const Buffer; nNumberOfBytesToWrite: DWORD; var lpNumberOfBytesWritten: DWORD; lpOverlapped: POverlapped): BOOL; stdcall; external 'kernel32.dll' name 'WriteFile';
WriteFile's Buffer parameter should NOT be untyped. That is incorrect.
Also, the lpNumberOfBytesWritten should NOT be a "var" parameter because, except in Windows 7, that parameter is optional, therefore it should be typed as a _pointer_ to DWORD.