Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CInternetFile::SetWriteBufferSize 

This topic has been updated for Visual Studio 2005 SP1.

Call this member function to set the size of the temporary write buffer used by a CInternetFile-derived object.


BOOL SetWriteBufferSize(
  UINT nWriteSize 
);

Parameters

nWriteSize

The size of the buffer in bytes.

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

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.

This section has been updated for Visual Studio 2005 SP1.

This method is not supported in Smart Device projects.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.