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 / March 2005

Tip: Looking for answers? Try searching our database.

Use C lib file in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kenneth - 25 Mar 2005 19:02 GMT
Hi all,

   I got two library files (*.lib) and some header files which is written
by ANSI C from a third party. Inside the header files, there are many
struct, variables and methods declare inside. I am now want to use them in
C#. I have been looking for a solution for a long time. I think the solution
now is to wrap them into VC++ 6 dll and then use them in a Managed C++
Project. Is my approach correct ?? Is there anyone whose can tell me the
method to wrap those libraries into dll in VC++ 6. As I am a beginner in C++
and there seems very few resources on this topic, it made me into a big
trouble!

Kenneth
Mattias Sj?gren - 25 Mar 2005 19:52 GMT
>I think the solution
>now is to wrap them into VC++ 6 dll and then use them in a Managed C++
>Project. Is my approach correct ??

Why not use it directly from MC++?

Mattias

Signature

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

Kenneth - 26 Mar 2005 06:13 GMT
Can I ? I got the *.lib and *.h files only(no dll). How can I achieve this?

Thx

"Mattias Sjögren" wrote:

> >I think the solution
> >now is to wrap them into VC++ 6 dll and then use them in a Managed C++
[quoted text clipped - 3 lines]
>
> Mattias
Mattias Sj?gren - 29 Mar 2005 10:46 GMT
>Can I ? I got the *.lib and *.h files only(no dll). How can I achieve this?

You #include the H file and link with the LIB file. The docs describe
how to do this, and I'm sure you can get help in the VC groups if you
get any problems.

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.