[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

how to call C++ lib file from C#

how to call C++ lib file from C#

sunny

7/6/2004 4:53:00 AM


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


Klaus H. Probst

7/7/2004 9:06:00 PM

Nope. It implies the ability to link statically, and .NET won't do that.


--
Klaus H. Probst, MVP
http://www....


"sunny" <sunny@websharp.org> wrote in message
news:#AGPqRwYEHA.2344@TK2MSFTNGP11.phx.gbl...
>
> 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
>
>



Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
how to call C++ lib file from C#

Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te

Il servizio è completamente GRATUITO!