The following code loads a dll in runtime using LoadLibrary().
boolean Load_Internals_dll()
{
boolean result = true;
//LOG_INIT;
HINSTANCE hApexRLIO = LoadLibrary(L"APEX_RLIO_Internals.dll");
printf("Checking getlasterror after loadlibrary:\n",GetLastError());
if(NULL == hApexRLIO)
{
result = false;
printf("[ERR]: Unable to load dll\n");
LOG_PRINT(" [ERR]: Unable to load dll.\n" );
}
result = InitRSIDComm_Lib_Func();
//LOG_EXIT;
return result;
}
After loading the dll, the handle hApexRLIO is found to be not null, but the function GetLastError() returns system error code 1627 (Function failed during execution).
What could be the possible causes for this error?
There is not much documentation for this error code in the web, VC++ ten gallon heads please help me solving this.