I've used the following function to call other DLLs, but for some reason I can't get this one to work correctly. It compiles, but
errors out when I try to run it. I think it has to do with the function name. The instructions name the function as
GetSrcBIOWIN. However, when I use Quick View Plus to view the
dll's properties, its named _GetSrcBIOWIN@52.
I don't know if the @ symbol in the function name is messing things up. Here's my function, any help is greatly appreciated:
Code:int CallBIOWDLL(void) { /* get handle to dll */ HINSTANCE hGetProcIDDLL = LoadLibrary("C:\\WINDOWS\\system32\\BIOWDLL.dll"); /* get pointer to the function in the dll*/ FARPROC lpfnGetProcessID = GetProcAddress(HMODULE(hGetProcIDDLL), "GetSrcBIOWIN"); /* Define the Function in the DLL for reuse. This is just prototyping the dll's function. A mock of it. Use "stdcall" for maximum compatibility. */ typedef int (__stdcall * pICFUNC)(char*,char*,char*,char*,char*,char*,char*,char*,char*,char*,char*,char*,char*); pICFUNC MyFunction; MyFunction = pICFUNC(lpfnGetProcessID); /* The actual call to the function contained in the dll */ int intMyReturnVal = MyFunction("test","test2",EstLin,EstNon,EstUlt,EstPrim,UltTime,PrimTime,EstMitiLin,EstMitiNon,DetailResults,numLines,ErrorMess); /* Release the Dll */ FreeLibrary(hGetProcIDDLL); /* The return val from the dll */ return intMyReturnVal; }



LinkBack URL
About LinkBacks


