CInternetFile::SetWriteBufferSize

BOOL SetWriteBufferSize( UINT nWriteSize );

Return Value

Nonzero if successful; otherwise 0. If the call fails, the Win32 function GetLastError may be called to determine the cause of the error.

Parameters

nWriteSize

The size of the buffer in bytes.

Remarks

Call this member function to set the size of the temporary write buffer used by a CInternetFile-derived object. The underlying WinInet APIs don’t perform buffering, so choose a buffer size that allows your application to write data efficiently regardless of the amount of data to be written. If each call to Write normally involves a large amount of data (for example, four or more kilobytes at a time), you should not need a buffer. However, if you call Write to write small chunks of data, a write buffer improves your application’s performance.

By default, a CInternetFile object does not provide any buffering for writing. If you call this member function, you must be sure that the file has been opened for write access. You can change the size of the write buffer at any time, but doing so causes an implicit call to Flush.

CInternetFile OverviewClass MembersHierarchy Chart