Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tor.martin.saur@gmail.com - 28 Sep 2005 18:45 GMT
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
Name of lib: TTSDK5.lib
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.