Hi guys, I'm developing an app in VB with a provided DLL from 3rd party. The SDK they provided includes a .dll file, .h file and .lib file, however this dll was written in CDECL calling convention which is unable to use in VB. So I started to do the wrapping DLL in STDCALL in C++ that calling functions from existing DLL, but my knowledge in C++ is very limited and I have no idea where should I start it with. Here is the code of .h file: Code: #define IVCSDK68_API extern "C" __declspec(dllexport) IVCSDK68_API int IVCSDK68_InitSDK(); IVCSDK68_API int IVCSDK68_CloseSDK(); IVCSDK68_API int IVCSDK68_SetDeviceOutputFormat(ColorSpace pCSType, VideoSize pVSize); IVCSDK68_API int IVCSDK68_GetDeviceOutputFormat(ColorSpace *pCSType, VideoSize *pVSize); IVCSDK68_API int IVCSDK68_SetVideoWindows(int iDeviceNum,int iChannelNum, CWnd *pWnd); Should I have to include the .lib file into my new DLL project? Any guidance would be highly appreciated.
Depends how you're linking with the 3rd party DLL. If you're statically linking then you need the .lib, but if you're dynamically loading with LoadLibrary et al then you don't need to link the .lib. This applies to all DLL linkages.