How to call managed C++ DLL from unmanaged C++ EXE 
Author Message
 How to call managed C++ DLL from unmanaged C++ EXE

Hallo!

I have a C/C++ programm, EXE+DLL's, a Win32 application.
I would like to write some functions with .NET Framework.

I wrote a Test-Exe, which is an unmanaged C++ Win32
Appilaction.

I wrote a Test-DLL, which is a managed C++ Win32
Application.

When I start the unamanged EXE, I get an error
When I build a managed C++ DLL, I get always an error
message:

Die Anwendung konnte nicht richtig initialisiert werden
(0xc0000005). Klicken Sie auf "OK", um die Anwendung zu
beenden.

When both proramms (EXE and DLL) are the same managed or
unmanaged, it runs.

But I will not to migrate the hole Application to a
managed code.

I wait for a good idea.
Thanks: Laszlo



Tue, 22 Feb 2005 15:15:45 GMT  
 How to call managed C++ DLL from unmanaged C++ EXE
Can you provide a simple short repro case that shows the problem. I know
that lots of people on the forum have successfully been able to call a DLL
compiled with /clr from a native exe, so there must be something specific in
your code.

Ronald Laeremans
Visual C++ compiler and libraries team


Quote:
> Hallo!

> I have a C/C++ programm, EXE+DLL's, a Win32 application.
> I would like to write some functions with .NET Framework.

> I wrote a Test-Exe, which is an unmanaged C++ Win32
> Appilaction.

> I wrote a Test-DLL, which is a managed C++ Win32
> Application.

> When I start the unamanged EXE, I get an error
> When I build a managed C++ DLL, I get always an error
> message:

> Die Anwendung konnte nicht richtig initialisiert werden
> (0xc0000005). Klicken Sie auf "OK", um die Anwendung zu
> beenden.

> When both proramms (EXE and DLL) are the same managed or
> unmanaged, it runs.

> But I will not to migrate the hole Application to a
> managed code.

> I wait for a good idea.
> Thanks: Laszlo



Wed, 23 Feb 2005 01:54:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. C# client crashs when calling into Managed C++ which calls unmanaged c++ function

2. Managed C++ call unmanaged DLL error

3. Unmanaged C++ calling managed C# dll

4. Problem calling into managed DLL that calls unmanaged DLL

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

6. managed C++ wrapper around unmanaged C++ classes: causing StackOverflow exception

7. Performance of unmanaged C++ in a managed C++ app

8. Fatal Error C1010 in Mixing Managed C++ and Unmanaged C++ Code

9. Inherit unmanaged c++ classes from .Net platform (managed c++ or c#)

10. managed c++ vs unmanaged c++

11. How to pass a function pointer from Managed C++ to unmanaged c++

12. Managed C++ and Unmanaged C++ and Inheritance

 

 
Powered by phpBB® Forum Software