Help and Support

DOC: Incorrect Prototype & Memory Allocation for PX_Blob

Article ID:135630
Last Review:November 21, 2006
Revision:2.2
This article was previously published under Q135630

SUMMARY

The documentation for the prototype of PX_Blob in the CDK Books Online is shown incorrectly as:
   BOOL PX_Blob( CPropExchange* pPX, LPCTSTR pszPropName,
 
      HGLOBAL*& hBlob, HGLOBAL hBlobDefault = NULL );
				
The actual prototype as shown in the CDK source code in Afxctl.h is:
   BOOL PX_Blob(CPropExchange* pPX, LPCTSTR pszPropName, HGLOBAL& hBlob,
 
      HGLOBAL hBlobDefault = NULL);
				

MORE INFORMATION

Note that the third parameter is incorrectly listed as HGLOBAL*& hBlob in the documentation and should instead be HGLOBAL& hBlob as shown in the actual prototype.

There is also another error in the PX_Blob remarks section of the documentation. It states the following incorrect information:
Note that PX_Blob will allocate memory, using the new operator, when loading BLOB-type properties. Therefore, the destructor of your control should call delete on any BLOB-type property pointers to free up any memory allocated to your control.
This correct documentation should be as follows:
Note that PX_Blob will allocate memory, using the Windows GlobalAlloc API, when loading BLOB-type properties. You are responsible for freeing this memory. Therefore, the destructor of your control should call GlobalFree on any BLOB-type property handles to free up any memory allocated to your control.
The problems described in this article were fixed in Visual C++, 32-bit edition, version 4.0 and later.

APPLIES TO
Microsoft Foundation Class Library 4.2, when used with:
  Microsoft OLE Control Developer's Kit (CDK)

Back to the top

Keywords: 
kbctrl kbdocfix KB135630

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.