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
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