Writes data to an open Internet file.
BOOL InternetWriteFile( __in HINTERNET hFile, __in LPCVOID lpBuffer, __in DWORD dwNumberOfBytesToWrite, __out LPDWORD lpdwNumberOfBytesWritten );
Handle returned from a previous call to FtpOpenFile or an HINTERNET handle sent by HttpSendRequestEx.
Pointer to a buffer that contains the data to be written to the file.
Number of bytes to be written to the file.
Pointer to a variable that receives the number of bytes written to the file. InternetWriteFile sets this value to zero before doing any work or error checking.
Returns TRUE if the function succeeds, or FALSE otherwise. To get extended error information, call GetLastError. An application can also use InternetGetLastResponseInfo when necessary.
When the application is sending data, it must call InternetCloseHandle to end the data transfer.
Send comments about this topic to Microsoft
Build date: 11/19/2009
If you are using InternetWriteFile to write to a file that is opened by FtpCommand with APPE command, InternetWriteFile may cause an access violation. See http://support.microsoft.com/default.aspx/kb/934376 for more details. This is fixed in Vista SP1.