WriteFile PROC
(MS-Windows)
Writes data to a file as either a synchronous or
an asynchronous operation.
Writing starts at the file position pointer.
After writing, the file pointer is adjusted by
the number of bytes written, except when the file is opened with
FILE_FLAG_OVERLAPPED.
WriteFile PROTO, ; write buffer to output file
fileHandle:DWORD, ; output handle
pBuffer:PTR BYTE, ; pointer to buffer
nBufsize:DWORD, ; size of buffer
pBytesWritten:PTR DWORD, ; number of bytes written
pOverlapped:PTR DWORD ; ptr to asynchronous info
Returns: (BOOL) EAX = TRUE (non-zero) if successful,
FALSE (zero) if fails.
|
| Argument | Win Type | MASM Type | Description |
|---|---|---|---|
| fileHandle | HANDLE | DWORD | Handle to the file to be written to. The file handle must have GENERIC_WRITE access. |
| pBuffer | LPCVOID | PTR BYTE | Pointer to the buffer containing the data to be written to the file. |
| nBufsize | DWORD | DWORD | Number of bytes to write to the file. Zero causes a null write operation - no bytes are written but the time stamp will be changed. |
| pBytesWritten | LPDWORD | PTR DWORD | Pointer to a DWORD to receive the number of bytes written. |
| pOverlapped | LPOVERLAPED | PTR DWORD | Pointer to an OVERLAPPED structure. This structure is required if fileHandle was created with FILE_FLAG_OVERLAPPED. |
| Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |