Home All Groups Group Topic Archive Search About

calling C code from VB.NET

Author
21 Dec 2006 6:11 PM
CAFxX
hi, I need just a little clarification about foreign language calling in
VB.NET (VS2005).
I have a solution containing two projects, one in VB.NET and the second
in C (a library).
The VB.NET project needs to call functions contained in the C library.
To do so, is it mandatory for the C library to be compiled as a DLL? In
short, isn't static linking possible? (I strongly doubt it, but I wanted
to ask anyway).
Thank you very much for your attention,
Carlo Alberto Ferraris

Author
21 Dec 2006 7:36 PM
David Browne
"CAFxX" <usenet0***@REMOVEMEcafxx.cjb.net> wrote in message
news:i7Aih.88404$Fk1.404040@twister2.libero.it...
> hi, I need just a little clarification about foreign language calling in
> VB.NET (VS2005).
> I have a solution containing two projects, one in VB.NET and the second in
> C (a library).
> The VB.NET project needs to call functions contained in the C library.
> To do so, is it mandatory for the C library to be compiled as a DLL? In
> short, isn't static linking possible? (I strongly doubt it, but I wanted
> to ask anyway).


See

Sample: Mixing Unmanaged C++, C++/CLI, and C# code
http://blogs.msdn.com/junfeng/archive/2006/05/20/599434.aspx

David