dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] PNET 0-6-0 and C++.NET DLL problem


From: Pierre Arnaud
Subject: [Pnet-developers] PNET 0-6-0 and C++.NET DLL problem
Date: Thu, 13 Nov 2003 23:17:17 +0100

Hello,

I'm pretty new to dotgnu and I have downloaded and installed the software
on a Windows box, using PNET-0-6-0-Installer-Light.exe. I then tried to
"ilrun" my application, which uses, amongst others, a DLL which was built
using managed C++. And "ilrun" seems to break its teeth on two external
references, namely:

[mscorlib] System.Runtime.CompilerServices.AssemblyAttributesGoHere
[mscorlib] System.Runtime.CompilerServices.AssemblyAttributesGoHereSM

which get attached to the attributes defining the assembly. I tried to
provide my own (empty) classes for these attributes, but the MS C++
compiler insisted on putting :

.custom
([mscorlib]System.Runtime.CompilerServices.AssemblyAttributesGoHereSM)
instance void
[mscorlib]System.Security.Permissions.SecurityPermissionAttribute::.ctor(val
uetype [mscorlib]System.Security.Permissions.SecurityAction) = ( 01 00 08 00
00 00 01 00 54 02 10 53 6B 69 70 56 65 72 69 66 69 63 61 74 69 6F 6E 01 ) //
........T..SkipVerification.

into the assembly. So I disassembled the DLL, removed that line and
used "ilasm" to rebuild it. Now, I have another problem, which is that
"ilrun" complains that it cannot verify the code, throwing a
System.Security.VerificationException.

Passing the unpatched DLL to "ilverify" does not work because of the
unresolved type AssemblyAttributesGoHereSM, and passing the patched
DLL to "ilverify" complains on every method that it cannot verify the
code.

So my question is: how am I supposed to integrate a DLL generated with
Microsoft managed C++ into PNET ?

Would it work if PNET's mscorlib provided the missing classes (which
are simply sealed classes with 0 argument constructors) ?

Would it be possible for me to sign my code or somehow authenticate
it so that "ilverify" would accept it as safe, and "ilrun" too ? I
have the public/private key pair, but don't know how to apply them
to PNET, and don't know if this would solve the problem.

Hope some gurus out there can shed some light on these mysteries...

    Pierre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]