Writes data to an open Internet file.
Syntax
BOOL InternetWriteFile(
__in HINTERNET hFile,
__in LPCVOID lpBuffer,
__in DWORD dwNumberOfBytesToWrite,
__out LPDWORD lpdwNumberOfBytesWritten
);
Parameters
- hFile [in]
-
Handle returned from a previous call to
FtpOpenFile or an
HINTERNET handle sent by
HttpSendRequestEx.
- lpBuffer [in]
-
Pointer to a buffer that contains the data to be written to the file.
- dwNumberOfBytesToWrite [in]
-
Number of bytes to be written to the file.
- lpdwNumberOfBytesWritten [out]
-
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.
Return Value
Returns TRUE if the function succeeds, or FALSE otherwise. To get extended error information, call
GetLastError. An application can also use
InternetGetLastResponseInfo when necessary.
Remarks
When the application is sending data, it must call
InternetCloseHandle to end the data transfer.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Version | Internet Explorer 3.0 or later |
| Header | Wininet.h |
| Library | Wininet.lib |
| DLL | Wininet.dll |
See Also
- Common Functions
- WinINet Functions
Send comments about this topic to Microsoft
Build date: 10/8/2009