all groups > dotnet interop > september 2005 >
You're in the

dotnet interop

group:

How can I access C++ .lib with C#


How can I access C++ .lib with C# tor.martin.saur NO[at]SPAM gmail.com
9/28/2005 10:45:18 AM
dotnet interop:
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
Re: How can I access C++ .lib with C# Mattias Sjögren
10/3/2005 12:00:00 AM
Tor,

[quoted text, click to view]

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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Re: How can I access C++ .lib with C# Richard T. Edwards
10/3/2005 7:09:42 AM
What's the lib file name?

[quoted text, click to view]

Re: How can I access C++ .lib with C# tor.martin.saur NO[at]SPAM gmail.com
10/3/2005 7:48:21 AM
Name of lib: TTSDK5.lib
AddThis Social Bookmark Button