 |
WriteFile ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The WriteFile function writes data to a file and is designed for both synchronous and asynchronous operation. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL WriteFile(
HANDLE hFile, // handle to file
LPCVOID lpBuffer, // data buffer
DWORD nNumberOfBytesToWrite, // number of bytes to write
LPDWORD lpNumberOfBytesWritten, // number of bytes written
LPOVERLAPPED lpOverlapped // overlapped buffer
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER WriteFile IN kernel32;
INTEGER hFile,;
INTEGER lpBuffer,;
INTEGER nBt2Write,;
INTEGER @ lpBtWritten,;
INTEGER lpOverlapped
|
 |
 |
 |
| Parameters: |
 |
hFile
[in] Handle to the file to be written to. The file handle must have been created with GENERIC_WRITE access to the file.
lpBuffer
[in] Pointer to the buffer containing the data to be written to the file.
nNumberOfBytesToWrite
[in] Specifies the number of bytes to write to the file.
lpNumberOfBytesWritten
[out] Pointer to the variable that receives the number of bytes written.
lpOverlapped
[in] Pointer to an OVERLAPPED structure. This structure is required if hFile was opened with FILE_FLAG_OVERLAPPED. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
| The function also can be used to put a message in a mailslot. |
 |
 |
| Word Index links for the WriteFile : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-11-05 21:03:22 | | Modified: | 2005-12-02 18:14:10 | Visited in last 7 days: 48 |