Allan said:
I think the error message says it all: the assembly built with
(managed extensions for) C++ is unverifiable. The question is, how do
you build a verifiable .exe assembly using C++ (whether or not you
want to use LoadFrom()). If someone has the answer, I too would be
truly grateful.
If you use VS2005 its easy, use /clr
ure <g>
If you use VS2003, you have to jump through hoops, and it won't
necessarily work. First, you have to get rid of the CRT (and hence no
global variables), next you have to get rid of all unmanaged types.
Replace static_cast<>'s and reinterpret_cast<>'s.
The odd thing is that you have to define a global variable called
_fltused and a global function called
_check_commonlanguageruntime_version. You also have to compile with
/clr:initialAppDomain, which is odd, because this is the v1.0 behaviour
(and has problems). Finally, you have to run SetILOnly on the assembly.
The full details are here:
http://msdn.microsoft.com/library/d...producingverifiablecomponentswithmanagedc.asp
Richard