Re: C# calls MFC, get assert -- auxdata.cpp lines 41, 42; appinit.cpp line 84

From: Michael \(michka\) Kaplan [MS] (michkap_at_online.microsoft.com)
Date: 07/22/04


Date: Thu, 22 Jul 2004 15:59:16 -0700

These three asserts occur if Unicode support does not exist on a platform
yet you linked to a Unicode static version of MFC. Some specific APIs that
really cannot otherwise fail (like getting the winsys dir) will, in fact,
fail. MFC will then crash because a string that is supposed to be filled
will crash derefencing the null pointer.

-- 
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division
This posting is provided "AS IS" with
no warranties, and confers no rights.
"Walter L. Williams" <sparticusnospam1701@NOSPAMhotmail.com> wrote in
message news:unSasLDcEHA.2504@TK2MSFTNGP12.phx.gbl...
> I'm seeing some odd behavior with a project, and I've attached a sample
that
> demonstrates the problem.  I'm using Visual Studio.NET 2003 Pro.
>
> What I have is a C# winform that calls to a regular MFC dll (MFC is
> statically linked, but it does the same thing with dynamic linkage).  The
> MFC dll is built for Unicode.  Under my English versions of Windows, all
> seems well.  When I run the same code under Win98SE Japanese, I get
asserts
> in auxdata.cpp lines 41 and 42, and appinit.cpp line 84.  Then the program
> crashes.
>
> I ran into this when I was converting the project to be Unicode based, so
it
> would support Far Eastern languages.
>
> I can't find any topics about this assert.
> ====================================================
> Walter Williams
> Software Engineer
> Sawtooth Software, Inc.
> http://www.sawtoothsoftware.com
> ---------------------------------------------------- 
> "Do, or do not. There is no try."
>
>
>
>


Relevant Pages