PC Review


Reply
Thread Tools Rate Thread

How to call C++ lib functions by C#

 
 
sunny
Guest
Posts: n/a
 
      6th Jul 2004

Dear everyone:
I know I can call a dll by c# like this:

using System.Runtime.InteropServices;
[DllImport("user32.dll")]
public static extern int MessageBox(int hWnd, String text,
String caption, uint type);

but now I want to call a lib file created by VC6.0,for example "a.lib".
Could anybody tell me how to do it?
Thanks!

Tom


 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      6th Jul 2004
Tom,

> but now I want to call a lib file created by VC6.0,for example "a.lib".
>Could anybody tell me how to do it?


You first have to link it into a DLL.



Mattias

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

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help - How to call functions that exists in the main application. The call should be initiated from one of the components. Anand Ganesh Microsoft C# .NET 5 16th Oct 2004 01:53 AM
Re: Please help - How to call functions that exists in the main application. The call should be initiated from one of the components. Baavgai Microsoft C# .NET 0 4th Sep 2004 05:54 AM
Re: call .NET functions from VB6 Armin Zingler Microsoft VB .NET 0 21st May 2004 12:11 AM
Functions--I don't know what else to call them Lyndsey Microsoft Excel Worksheet Functions 4 30th Mar 2004 05:23 PM
Call C functions in C# Christopher Sin Microsoft C# .NET 3 29th Oct 2003 03:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:57 PM.