PRB: MFC Classes Removed from OLE CDK Runtime DLLs

ID: Q122291


The information in this article applies to:
  • Microsoft OLE Control Developer's Kit (CDK), version 1.0


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 :
Version : :1.0
Platform :
Issue type :


Last Reviewed: January 18, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.