Microsoft KB Archive/166769

= PRB: MFC ActiveX Document Servers Require Compound File Support =

Article ID: 166769

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.2 Professional Edition

 Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.2 Professional Edition</li></ul>

 Microsoft Visual C++ 5.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 5.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 6.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q166769

<div class="symptoms_section">

SYMPTOMS
When you save an ActiveX Document that does not use compound files from Internet Explorer functioning as an ActiveX Document Container, the file will be saved in compound document format. Subsequent attempts to load the file in Internet Explorer results in the exception "Unexpected File Format."

Microsoft Binder will not load the document.

<div class="cause_section">

CAUSE
The MFC ActiveX Document Server classes normally require compound file support.

<div class="resolution_section">

RESOLUTION
Add a call to EnableCompoundFile(TRUE) in the document constructor: CScribDoc::CScribDoc {       // ...        EnableCompoundFile(TRUE); }

<div class="moreinformation_section">

MORE INFORMATION
Creating a new ActiveX Document server or regular OLE embedding server in AppWizard selects compound file support by default. The assertion problem occurs if compound file support was deselected when the project was initially created.

Keywords: kbactivedocs kblocalsvr kbautomation kbprb KB166769

-

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

© Microsoft Corporation. All rights reserved.