can unmanaged code be verifiable?

  • Thread starter Thread starter Gideon
  • Start date Start date
G

Gideon

I have got some C++ code that uses STL containers.
I need to use that code from a C# application, so compiled it as a .NET
assembly.
As I wish to run the project on a web environment, the DLL must be
verifiable.
As far as I understand, unless it's managed, it cant be verifiable.
One idea I had was to use System.Collections containers instead of the STL
containers. As I dont want to make changes to the original code, I thought I
could just create wrappers for the STL containers.
That approach didnt quite work, as I cannot provide the STL interface for my
new containers, for reasons such as being unable to override the * and ->
operators. (It's not allowed in managed code.)
Has anyone got a better (working) idea, or knows of an already existing
solution to this problem?

Cheers,
g.

p.s.
Alternatively, is there a way of making unmanaged code verifiable?
 
Hi Gideon,

Unmanaged code cannot be verifiable using the CAS mechanism since it
requires provable type safety.

And you definitely won't be able to create a verifiable replacement for STL
that can keep the client side code intact since the STL interface by itself
clearly isn't type safe in the CLR sense.

Of course nothing prevents you from using unverifiable code in an ASP.Net
application. The only reason that I could see is when using a low end
hosting plan that doesn't allow you to use non verifiable code.

Ronald Laeremans
Visual C++ team
 
Back
Top