This documentation is archived and is not being maintained.


Call this function to attach a block of memory to CHtmlStream.

void Attach(
   BYTE* lpBuffer,
   UINT nBufferSize,
   UINT nGrowBytes = 0 



Pointer to the buffer to be attached to CHtmlStream.


An integer that specifies the size of the buffer in bytes.


The memory allocation increment in bytes.

This causes CHtmlStream to use the block of memory as the memory file.

If nGrowBytes is 0, CHtmlStream will set the file length to nBufferSize. This means that the data in the memory block before it was attached to CHtmlStream will be used as the file data. Memory files created in this manner cannot be grown.

Because the file cannot be grown, be careful not to cause CHtmlStream to attempt to grow the file. Don't use operator << to add data.