DLL loading trouble.
-
I created a dll (Win32- Dynamic Link Library) and I'm having a trouble loading that DLL ( using 'LoadLibrary' / 'GetModuleHandle') *** I keep getting a NULL or the handle is invalid. (GetLastError() returns 6 or 126) *** PLEASE, I've been on then about 6 hours straight. Is there anything I'm missing ???? NOTES: 1: Could it be that functions can not be importable? 2: Could it be that the released .dll file is damaged? please H E L P ! ! ! Name: STR
-
I created a dll (Win32- Dynamic Link Library) and I'm having a trouble loading that DLL ( using 'LoadLibrary' / 'GetModuleHandle') *** I keep getting a NULL or the handle is invalid. (GetLastError() returns 6 or 126) *** PLEASE, I've been on then about 6 hours straight. Is there anything I'm missing ???? NOTES: 1: Could it be that functions can not be importable? 2: Could it be that the released .dll file is damaged? please H E L P ! ! ! Name: STR
Hi, The GetLastError() function of yr's says "Handle invalid"(6) and "Module can't be found"(126).So, I hope problem with the Dll path u have given.First find out in which path yr Dll is present and give that path in the LoadLibrary()/GetModuleHandle() function.Then check for the handle.This could be the only problem I hope.Let me know if it works. Regards, yamini.
-
Hi, The GetLastError() function of yr's says "Handle invalid"(6) and "Module can't be found"(126).So, I hope problem with the Dll path u have given.First find out in which path yr Dll is present and give that path in the LoadLibrary()/GetModuleHandle() function.Then check for the handle.This could be the only problem I hope.Let me know if it works. Regards, yamini.
Thanks for your quick answer But... That is not the problem. I could this function like this: 1: 'LoadLibrary("c:\\MyDLL2.DLL")' or 2: 'LoadLibrary(_T("c:\\MyDLL2.DLL"))' or 3: 'LoadLibrary((LPCTSTR)"c:\\MyDLL2.DLL")' *) I added 'C:\MyDLL2.lib' in Project->Settings... *) I added 'C:\' to the system path *) I added 'C:\' to the project path (in Project->Settings) :(( I don't know what to do :(( Name: STR
-
I created a dll (Win32- Dynamic Link Library) and I'm having a trouble loading that DLL ( using 'LoadLibrary' / 'GetModuleHandle') *** I keep getting a NULL or the handle is invalid. (GetLastError() returns 6 or 126) *** PLEASE, I've been on then about 6 hours straight. Is there anything I'm missing ???? NOTES: 1: Could it be that functions can not be importable? 2: Could it be that the released .dll file is damaged? please H E L P ! ! ! Name: STR
Launch depends.exe - Dependency Walker which is a part of MsVisual C++. Drag and drop this Your dll onto depends.exe window. See what it will say. Probably some dll which is required by Your dll cannot be found. For example the dll You are loading needs msvcrt.dll(insert any), which is not on the path. Hope, this helps