Re: Converting .lib to .dll



On 2008-06-18 11:01:48 +0100, "Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> said:

I have been given an SDK for a CF network card that consists of a .lib
static library file and a .h C header file. I want to be able to use the
functions in the library in my .NET code. As far as I can see, I have to
convert the .lib file to a .dll file, and then use DllImport to P/Invoke the
functions, or write .NET wrapper code for it. Is there an easy way to do
this? Thanks in advance.

Andy Baker

The header file should contain all the function prototypes from the DLL and you can use this to create the P/Invoke prototypes in C# or VB. Other than that, you'll just need to make sure that the DLL is present on the device where you deploy your application. You'll only need the LIB if you're writing native code against the SDK.

--
Neil Cowburn MVP
Principal Partner
OpenNETCF Consulting

.


Loading