Microsoft KB Archive/315476

= BUG: &quot;Debug Assertion Failed&quot; Dialog Box When You Build an MFC Application with &quot;Container/Full Server&quot; Compound Document Support =

Article ID: 315476

Article Last Modified on 4/11/2003

-

APPLIES TO


 * Microsoft Visual C++ .NET 2002 Standard Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition

-



This article was previously published under Q315476



SYMPTOMS
When you build a Microsoft Foundation Classes (MFC) application with &quot;container/full server&quot; compound document support, you may receive a Debug Assertion Failed dialog box with contents similar to the following:

Program: i:\content\GenAssert\Debug\GenAssert.exe

File: docmgr.cpp

Line: 339

After you click Retry, a Send error report dialog box is displayed.



CAUSE
This behavior occurs if the string resource that is generated for the document template is missing a &quot;.&quot; character.

The wizard-generated string resource is as follows:

MyCLass\nMyCLass\nMyCLass\nMyCLass Files


 * .myc)\nmyc\nMyCLass.Document\nMyCLass Document

This resource should be as follows:

MyCLass\nMyCLass\nMyCLass\nMyCLass Files


 * .myc)\n.myc\nMyCLass.Document\nMyCLass Document

NOTE: The missing &quot;.&quot; character in the wizard-generated version is in the &quot;nmyc&quot; section of the string.



RESOLUTION
To work around this issue, manually edit the resource (*.rc) file to add the &quot;.&quot; character.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Problem

 * 1) Create an MFC application named &quot;GenAssert&quot; with &quot;container/full server&quot; compound document support.
 * 2) Set the file extension as &quot;xxx&quot; under Document Template Strings.
 * 3) Enable automation under Advanced Features.
 * 4) Add an MFC class to the project.
 * 5) Set the class name as MyClass.
 * 6) Set the Base Class value as CFormView.
 * 7) Click to select the Generate DocTemplate resources check box.
 * 8) Build the project. You receive a dialog box similar to the one described in the &quot;Symptoms&quot; section of this article.

Keywords: kberrmsg kbbug kbfix kbwizard KB315476

-

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

© Microsoft Corporation. All rights reserved.