C# client crashs when calling into Managed C++ which calls unmanaged c++ function 
Author Message
 C# client crashs when calling into Managed C++ which calls unmanaged c++ function

With a managed c++ warpper, I've compile a unmanaged c++ program into
assemby.  However, in a C# winform client, though the managed c++ object are
created, which in turn instantiate a unmanged c++ object, both OK.

However, the the chain calls from c# to mc++ (fine) then into unmc++ and
come back, when program exit the c# Main () and about to display the
windows, it crashs with some assert fail message.

What would the problem?  This is the first MFC program I am trying to port
to .Net, please advise.  Thanks



Sat, 23 Apr 2005 15:00:36 GMT  
 C# client crashs when calling into Managed C++ which calls unmanaged c++ function
The assertion error mentioned:

afxwin1.inl line 31 which is
_AFXWIN_INLINE LPCTSTR AFXAPI AfxGetAppName()
        { ASSERT(afxCurrentAppName != NULL); return
afxCurrentAppName; }

Please help, thanks.

Quote:
>-----Original Message-----
>With a managed c++ warpper, I've compile a unmanaged c++
program into
>assemby.  However, in a c# winform client, though the

managed c++ object are
Quote:
>created, which in turn instantiate a unmanged c++
object, both OK.

>However, the the chain calls from c# to mc++ (fine) then
into unmc++ and
>come back, when program exit the c# Main () and about to
display the
>windows, it crashs with some assert fail message.

>What would the problem?  This is the first mfc program I
am trying to port
>to .Net, please advise.  Thanks

>.



Sun, 24 Apr 2005 02:51:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Unmanaged C++ calling managed C# dll

2. How to call managed C++ DLL from unmanaged C++ EXE

3. Managed C++ call unmanaged DLL error

4. C++ Dot net: calling managed method from unmanaged code

5. Interoperability UnManaged C++, Managed C++, C#

6. Call C# dll from unmanaged C++

7. Unmanaged C++ calling GUI in C#

8. example of unmanaged C++ calling C# ?

9. Calling COM method from managed c++ client

10. Problem calling into managed DLL that calls unmanaged DLL

11. Calling Managed C++ function from C# with array parameters

12. Calling Managed C++ function from C# with array parameters

 

 
Powered by phpBB® Forum Software