Microsoft KB Archive/122291

= PRB: MFC Classes Removed from OLE CDK Runtime DLLs =

Article ID: 122291

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft OLE Control Developer's Kit (CDK)

-



This article was previously published under Q122291



SYMPTOMS
The OLE control runtime DLLs contain a subset of the full MFC library. If you attempt to instantiate a class that is unavailable, the compiler will generate the following (or similar) error messages:

error C2501: 'CRecordSet' : missing decl-specifiers

error C2239: unexpected token 'identifier' following declaration of 'CRecordSet'

error C2061: syntax error : identifier 'recordset'



CAUSE
The errors occur because preprocessor directives are used to remove several MFC class definitions from the MFC header files when building an OLE control.



RESOLUTION
You can prevent these errors from occuring by simply not declaring any instances of classes listed in the More Information section. The classes are not available for OLE controls.



STATUS
This behavior is by design.



MORE INFORMATION
The following lists the general-purpose MFC classes that are unavailable for OLE controls:

CDocTemplate

CDocItem

CMDIFrameWnd

CMDIChildWnd

CMultipleDocTemplate

CDocTemplate

COleBusyDialog

COleChangeIconDialog

COleClientItem

COleConvertDialog

COleDialog

COleDocument

COleFrameHook

COleInsertDialog

COleIPFrameWnd

COleLinkingDoc

COleLinksDialog

COleMessageFilter

COlePasteSpecialDialog COleServerDoc

COleServerItem

COleTemplateServer

COleUpdateDialog

Also, all MFC database classes are unavailable in version 1.0 of the CDK, including:

CDatabase

CRecordSet

CRecordView

CLongBinary

CFieldExchange

CDBException

NOTE: The database classes are now included in version 1.1 of the CDK.

Additional query words: 1.00 ole control database class

Keywords: KB122291

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.