Connecting Tech Pros Worldwide Forums | Help | Site Map

Import Class from API

[Yosi]
Guest
 
Posts: n/a
#1: Nov 17 '05
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
Guest
 
Posts: n/a
#2: Nov 17 '05

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.
Closed Thread