can unmanaged code be verifiable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gideon

    #1

    can unmanaged code be verifiable?

    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.Collecti ons 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?


  • Ronald Laeremans [MSFT]

    #2
    Re: can unmanaged code be 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

    "Gideon" <gideon_MaPs_On @dwl.co.uk.inva lid> wrote in message
    news:%23%23565N 1rDHA.1784@TK2M SFTNGP09.phx.gb l...[color=blue]
    > 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.Collecti ons containers instead of the STL
    > containers. As I dont want to make changes to the original code, I thought[/color]
    I[color=blue]
    > could just create wrappers for the STL containers.
    > That approach didnt quite work, as I cannot provide the STL interface for[/color]
    my[color=blue]
    > 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?
    >
    >[/color]


    Comment

    Working...