K
Kalafiorczyk
Good day ladies and gentlemen!
I have a short proggie:
-----------------------------------------------------------------------
#using <mscorlib.dll>
using namespace System::Security:ermissions;
[assembly:SecurityPermissionAttribute(
SecurityAction::RequestMinimum,SkipVerification=false)];
using namespace System;
int main()
{
#if SSSS
Console::WriteLine(S"Hello,managed world!");
#else
int i(0);
#endif
return 0;
}
-----------------------------------------------------------------------
which, when compiled as follows:
cl /clr:initialAppDomain /Od /DSSSS=1 prog.cpp nochkclr.obj /link /entry:main /fixed:no /opt:ref
silo -s prog.exe
peverify prog.exe
produces a pure executable assembly. When SSSS=0 it creates an
working executable assembly that doesn't pass the purity test:
[IL]: Error: Unverifiable PE Header/native stub.
I've tried using "Int32" instead of "int" with no joy.
My question to the gurus is: what is the appropriate integer
type to use that will not destroy the purity of a .NET assembly?
I know that I should probably just wait for the 2004 release
of Visual Studio, but I like to hear the opinion of the gurus
about the current state of the art in purity of managed C++.
Thanks in advance,
Sylvester
I have a short proggie:
-----------------------------------------------------------------------
#using <mscorlib.dll>
using namespace System::Security:ermissions;
[assembly:SecurityPermissionAttribute(
SecurityAction::RequestMinimum,SkipVerification=false)];
using namespace System;
int main()
{
#if SSSS
Console::WriteLine(S"Hello,managed world!");
#else
int i(0);
#endif
return 0;
}
-----------------------------------------------------------------------
which, when compiled as follows:
cl /clr:initialAppDomain /Od /DSSSS=1 prog.cpp nochkclr.obj /link /entry:main /fixed:no /opt:ref
silo -s prog.exe
peverify prog.exe
produces a pure executable assembly. When SSSS=0 it creates an
working executable assembly that doesn't pass the purity test:
[IL]: Error: Unverifiable PE Header/native stub.
I've tried using "Int32" instead of "int" with no joy.
My question to the gurus is: what is the appropriate integer
type to use that will not destroy the purity of a .NET assembly?
I know that I should probably just wait for the 2004 release
of Visual Studio, but I like to hear the opinion of the gurus
about the current state of the art in purity of managed C++.
Thanks in advance,
Sylvester