CCW and 0x80131522

G

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top