I'm a newbie to C++ and C#. I have a SDK written in C++ (in a lib
file).
I can't modify the lib file.
Can I in anyway access C++ functions in C# classes?
I supose I'm looking for a way to wrap the C++ class(es) in to C#.
I have heard about managed/unmanaged code, plattform invoke
What should I do first?
I would love some links to tutorials or someting..
Absolutly all comments welcome!
Best R
Tor M
Richard T. Edwards - 03 Oct 2005 12:09 GMT
What's the lib file name?
> I'm a newbie to C++ and C#. I have a SDK written in C++ (in a lib
> file).
[quoted text clipped - 13 lines]
>
> Tor M
tor.martin.saur@gmail.com - 03 Oct 2005 15:48 GMT
Mattias Sjögren - 03 Oct 2005 23:41 GMT
Tor,
>Can I in anyway access C++ functions in C# classes?
Not directly. You'll have to link the Lib file into a C++ Dll and
export the functionality you want in some way callable by C# (managed
C++ classes, COM objects or static entry points called with P/Invoke).
Mattias

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