473,473 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem using unmanaged static libs from managed C++ Windows Form Application in VC2005

Art
I have some Static libs which were intially implemented in VC6 and
then converted to VC2005.
When I try to use these in my managed C++ application, I am getting
the following exception:

An unhandled exception of type 'System.TypeInitializationException'
occurred in Unknown Module.

Additional information: The type initializer for '<Module>' threw an
exception.

Any comments/url is appreciated.

Here is the output :
-------------------------------------
First-chance exception at 0x1021c0a7 (msvcr80d.dll) in NewTestVC.exe:
0xC0000005: Access violation reading location 0xae59162c.
A first chance exception of type 'System.AccessViolationException'
occurred in NewTestVC.exe
First-chance exception at 0x7c96df51 in NewTestVC.exe: 0xC0000005:
Access violation reading location 0xae591630.
A first chance exception of type
'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
A first chance exception of type
'<CrtImplementationDetails>.ModuleLoadExceptionHan dlerException'
occurred in msvcm80d.dll
First-chance exception at 0x7c812a5b in NewTestVC.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
An unhandled exception of type 'System.TypeInitializationException'
occurred in Unknown Module.

Thanks a lot for the help,

Jul 18 '07 #1
1 4891
Hi Art,
I have some Static libs which were intially implemented in VC6 and
then converted to VC2005.
When I try to use these in my managed C++ application, I am getting
the following exception:

An unhandled exception of type 'System.TypeInitializationException'
occurred in Unknown Module.

Additional information: The type initializer for '<Module>' threw an
exception.

Any comments/url is appreciated.
You must not use the static CRT when you compile managed code:

http://msdn2.microsoft.com/en-us/lib...yh(VS.80).aspx

--
SvenC
Jul 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Chris Kiechel | last post by:
I am writing a .NET Windows application and it needs to perform DDE calls to a legacy system. I created a C++ unmanaged class that performs the actual DDE connection and communication. However,...
10
by: Mark Jerde | last post by:
I'm trying to learn the very basics of using an unmanaged C++ DLL from C#. This morning I thought I was getting somewhere, successfully getting back the correct answers to a C++ " int SumArray(int...
1
by: Adam Clauss | last post by:
I have an unmanaged C++ library that I need to use through C#. I created a Managed C++ class library and through it wrote a wrapper class to call what I need. However, one of the methods (an...
8
by: Nadav | last post by:
Hi, I am writing a performence critical application, this require me to stick to unmanaged C++ as performance is much better using unmanaged C++ ( about 33% better ), Still, I am trying to avoid...
2
by: Joerg M. Colberg | last post by:
I have a VS.Net solution that contains various projects. Some of the projects contain programme blocks (legacy code) that are used by some of the other projects. One project contains some C code...
1
by: s_schutte | last post by:
Here's my situation. I have an unmanaged C++ project that I am using to interface with the Lotus Notes C API. I then have a managed C++ project in the same solution that functions as a "C++...
0
by: Arne Adams | last post by:
Hi all, i have a managed c++ dll using both managed and unmanaged code and an unmanaged application that calls the unmanaged code of the managed dll. I did follow...
0
by: ArtiB | last post by:
Hi, I have VC++ Windows form application in VS 2005. I am not able to access some static libs(VC6 migrated) from this application. Getting exception of type 'System.TypeInitializationException' in...
3
by: Pixel.to.life | last post by:
Hi, Gurus, I recently attempted to build a .Net forms application, that links with old style unmanaged C++ static libs. Of course I had to recompile the static lib projects to link properly...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.