PRB: MFC Classes Removed from OLE CDK Runtime DLLs

Last reviewed: October 12, 1995
Article ID: Q122291
The information in this article applies to:
  • Microsoft OLE Control Development 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 reference words: 1.00
KBCategory: kbole kbprg kbtool kbprb
KBSubcategory: CDKIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 12, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.