Re: Converting .lib to .dll

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 2008-06-19 11:54:46 +0100, "Andy Baker" <abaker@xxxxxxxxxxxxxxxxxx> said:

Now all I need to know is how to actually put the
code into my functions. I presume I need to add the supplied sdc_sdk.lib
file somewhere, but cannot see how to do it. I then need to call the
functions in the LIB file from my DLL functions. Any further help would be
greatly appreciated.


I suggest you prefix the functions you are creating with something unique, such as "VP_" so that you can simply make a "pass-through" call to the Summit function, like this:

SUMMIT_API SDCERR VP_GetCurrentConfig(DWORD *num, char *name)
{
return GetCurrentConfig(num, name);
}

As for the LIB, you need to add this to the linker command-line.

* Right-click the project and select properties
* Expand the Linker node and select Command Line (last option)
* Enter the name of the lib (presumably: sdk.lib) into the Additional Options text box.

Make sure you do this for both Debug and Release.

--
Neil Cowburn MVP
Principal Partner
OpenNETCF Consulting

.