Search code examples
c++cvisual-studio-2008visual-studio-2010pinvoke

Reverse P/Invoke tutorial?


I've a old C/C++ class that i want to refactor and access from .net using PInvoke

All P/Invoke tutorials refers to call win32 api but i haven't found anything to code the other side

Any tips/ideas ? my c/c++ experience is pretty rusty :(

UPDATE - this is for wrapping existing C/C++ code so it can called from .net using P/Invoke

How do i define the C function so from .net i can get the value using ref/out strings


Solution

  • Here you find help
    C++ Interop
    Walkthrough: Porting an Existing Native C++ Application to Interoperate with .NET Framework Components
    Use Our ManWrap Library to Get the Best of .NET in Native C++ Code
    How to call C++ code from Managed, and vice versa (Interop)