473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

CCW and 0x80131522

We have written a COM wrapper around the FlexGrid control called GridControl.
It is written using ATL and completely unmanaged C++. It uses ADO Recordsets
for its interaction with clients.

We now want to include it into a C++/CLI application. We have code which
uses #import "GridControl.dll" to gain access to it. This worked well when
our application was just a C++ one, but now it has /clr switched we get the
following error at startup (very very early in the process)

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

Additional information: Could not load file or assembly 'OurApplicationName,
Version=1.0.2207.30381, Culture=neutral, PublicKeyToken=f456eafc1bd82344' or
one of its dependencies. Could not find or load a type. (Exception from
HRESULT: 0x80131522)

I have created a CCW using TBLIMP for the GridControl and signed it ike this:

tlbimp /publickey:GridControl_PublicKey.snk /delaysign
...\bin\GridControl.dll /out:Interop.GridControlLib.1.0.dll
sn -Vr Interop.GridControlLib.1.0.dll
copy "$(ProjectDir)Interop.GridControlLib.1.0.dll" "..\bin\"
gacutil /i ..\bin\Interop.GridControlLib.1.0.dll

I have added a refernece to the CCW to the applicaiton (by browsing, did not
appear in the .Net list) and when it builds it takes a copy of this file
into its debug folder.

I just can't get it to run. I have tried copying all the files into a single
folder (including the ADODB PIA) but something is not right.

Any suggestions?
Thanks

Colin
Jan 16 '06 #1
3 9383

I am getting the same error in a slightly different context and, using
google, this is the only post I could find with the same exact
problem.

If anyone has any information it would greatly be appreciated. I've
tried even recreating the entire solution and all projects in it
(instead of upgrading from VS 2003 to VS 2005) to no avail.

I have an MFC project built with \CLR:oldSyntax and am using an
assembly written in C#. I have the code so it is as a project in my
solution and referenced as such. I also get the exception early in the
application's startup. All of my native DLLs load fine but then this is
thrown shortly after mscorlib is loaded. After mscorlib there is this:

'ourapp.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols
loaded.
'ourapp.exe': Loaded 'C:\WINDOWS\system32\msctf.dll', No symbols
loaded.
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: EETypeLoadException at memory location 0x0012e68c..
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
An unhandled exception of type 'System.IO.FileLoadException' occurred
in Unknown Module.

Additional information: Could not load file or assembly 'ourapp,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Could not find or load a type. (Exception from HRESULT:
0x80131522)

The program '[3636] ourapp.exe: Managed' has exited with code 0 (0x0).
The program '[3636] ourapp.exe: Native' has exited with code 0 (0x0).

Does this help any?
--
brianpoteat
------------------------------------------------------------------------
brianpoteat's Profile: http://www.hightechtalks.com/m802
View this thread: http://www.hightechtalks.com/t2333622

Jan 23 '06 #2
Brian,

There is a resolution to this problem, but you won't like it! It turns out
to be related to a hard limit in .Net regarding the number of symbols in an
assembly. Take a look at my other post called "Message: Internal limitations:
too many fields" for a brief discussion of the problem.

Colin.

"brianpoteat" wrote:

I am getting the same error in a slightly different context and, using
google, this is the only post I could find with the same exact
problem.

If anyone has any information it would greatly be appreciated. I've
tried even recreating the entire solution and all projects in it
(instead of upgrading from VS 2003 to VS 2005) to no avail.

I have an MFC project built with \CLR:oldSyntax and am using an
assembly written in C#. I have the code so it is as a project in my
solution and referenced as such. I also get the exception early in the
application's startup. All of my native DLLs load fine but then this is
thrown shortly after mscorlib is loaded. After mscorlib there is this:

'ourapp.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols
loaded.
'ourapp.exe': Loaded 'C:\WINDOWS\system32\msctf.dll', No symbols
loaded.
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: EETypeLoadException at memory location 0x0012e68c..
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
First-chance exception at 0x7c81eb33 in ourapp.exe: Microsoft C++
exception: [rethrow] at memory location 0x00000000..
An unhandled exception of type 'System.IO.FileLoadException' occurred
in Unknown Module.

Additional information: Could not load file or assembly 'ourapp,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Could not find or load a type. (Exception from HRESULT:
0x80131522)

The program '[3636] ourapp.exe: Managed' has exited with code 0 (0x0).
The program '[3636] ourapp.exe: Native' has exited with code 0 (0x0).

Does this help any?
--
brianpoteat
------------------------------------------------------------------------
brianpoteat's Profile: http://www.hightechtalks.com/m802
View this thread: http://www.hightechtalks.com/t2333622

Jan 24 '06 #3
Crap. Well, thanks Colin. I'll take a look and see if it's the same
problem.

Jan 24 '06 #4

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

Similar topics

0
by: Greg Bacon | last post by:
I have two C# projects: a production project and NUnit tests for it. I've recently added a test that causes a call into a registered COM component, and now the test fails with a TypeLoadException...
1
by: Doctorslicer | last post by:
Hi All, We have a large multi project application in MFC that we are converting to managed code. We have been able to add /CLR to all of the projects and have compiled successfully but encounter...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
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...

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.