Import Class from API

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • [Yosi]

    Import Class from API

    I have an API (*.DLL) written with C/C++ language, I successfully import the
    functions from C# application by :
    [Imprt....]
    static extern ............... .

    Now:
    How can I do the same with Class? How to import an class from API
    written with C++ language to C# (My application).

  • Mattias Sjögren

    #2
    Re: Import Class from API

    [color=blue]
    > How can I do the same with Class? How to import an class from API
    >written with C++ language to C# (My application).[/color]

    You can't do that easily (there's an example in the SDK of calling
    exported class methods, but you still can't instantiate the class
    etc). It would be a lot easier to write a MC++ wrapper for it and use
    that from C#.



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org
    http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
    Please reply only to the newsgroup.

    Comment

    Working...