Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CHtmlStream Class

Visual Studio .NET 2003
class CHtmlStream

Remarks

CHtmlStream does not have a base class.

CHtmlStream is a class that manages in-memory HTML. HTML memory files are useful for temporarily storing raw bytes or serialized objects prior to their transmission. Although it is not derived from CFile, CHtmlStream behaves like the CFile–derived class CMemFile, except CHtmlStream is used to store data in a temporary buffer prior to sending it out, and the data stored in a CHtmlStream memory file cannot be read.

CHtmlStream objects usually are created automatically and handed to you by CHttpServer::ConstructStream; however, you can override CHttpServer::ConstructStream and provide your own special functionality.

CHtmlStream objects can automatically allocate their own memory or you can attach your own memory block to the CHtmlStream object by calling Attach. In either case, memory for growing the memory file automatically is allocated in nGrowBytes-sized increments if nGrowBytes is not zero. Set nGrowBytes with a parameter to the constructor.

The memory will automatically be deleted upon destruction of the CHtmlStream object if the memory was originally allocated by the CHtmlStream object; otherwise, you are responsible for deallocating the memory you attached to the object.

CHtmlStream uses the run-time library functions malloc, realloc, and free to allocate, reallocate, and deallocate memory; and the intrinsic memcpy to block copy memory when growing the buffer. To change this behavior or the behavior when CHtmlStream grows a file, derive your own class from CHtmlStream and override the appropriate functions.

Requirements

Header: afxisapi.h

See Also

MFC Sample WWWQUOTE

Class Members | Hierarchy Chart | CHttpServer | CHttpFilter

Show:
© 2015 Microsoft