Managed C++ call unmanaged DLL error 
Author Message
 Managed C++ call unmanaged DLL error

Hi,

I am using a managed C++ application to call existing unmanaged DLLs. I have
included all necessary head files for the DLLs and add a library to the
project. There is no error before running. When I run it, it always say:

An unhandled exception of type 'System.TypeLoadException' occurred in
man.exe
Additional information: Could not load type ACQ_tag from assembly man,
Version=1.0.1250.24446, Culture=neutral, PublicKeyToken=null.

The "ACQ_tag" is defined in a head file which I have included.

Could anyone help me? Thank you for any suggestion.

Jerry



Sun, 20 Nov 2005 10:49:44 GMT  
 Managed C++ call unmanaged DLL error

Quote:

> Newsgroups: microsoft.public.dotnet.languages.vc
> Subject: Managed C++ call unmanaged DLL error

> Hi,

> I am using a managed C++ application to call existing unmanaged DLLs. I
have
> included all necessary head files for the DLLs and add a library to the
> project. There is no error before running. When I run it, it always say:

> An unhandled exception of type 'System.TypeLoadException' occurred in
> man.exe
> Additional information: Could not load type ACQ_tag from assembly man,
> Version=1.0.1250.24446, Culture=neutral, PublicKeyToken=null.

> The "ACQ_tag" is defined in a head file which I have included.

> Could anyone help me? Thank you for any suggestion.

> Jerry

Jerry,

Can you provide a reduced test case that demonstrates the problem?

Does your managed C++ application create any instances of ACQ_tag? If there
are no instances defined in your application, the complete type description
may not have made it into the final image, which would result in the an
inability to load the types. If that is the case, you can workaround it by
instantiating the type in the application.

Mark...

--
Mark Levine, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm



Sat, 03 Dec 2005 02:04:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. Problem calling into managed DLL that calls unmanaged DLL

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

4. Unmanaged C++ calling managed C# dll

5. Calling a Managed DLL from and UnManaged DLL

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

7. Calling function in managed dll from Unmanaged MFC Application doesn't work on XP

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

9. Debugging into managed c++ DLL that is being used by unmanaged code

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

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

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

 

 
Powered by phpBB® Forum Software