How to call C++ lib functions by C#

  • Thread starter Thread starter sunny
  • Start date Start date
S

sunny

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
 
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
 
Back
Top