Native dll function call C++
typedef __DLL_FUNCTION bool PMyFUNCT (const wchar_t* szCon, const wchar_t* szName); HINSTANCE lib; void myMethod(const wchar_t* szCon, const wchar_t* szName)
{
int lastError = 0; bool bSaved = false; lib = LoadLibrary("mylib.dll"); if(lib) { // Get the address of the function PMyFUNCT *cFunction; cFunction = ( PMyFUNCT *)GetProcAddress(lib, "_myFunct"); if(cFunction) { cFunction(szCon, szName); } } }
Niciun comentariu:
Trimiteți un comentariu