I\'m having trouble with LoadLibrary() and getting an error that doesn\'t make sense to me:
::SetLastError(0);
m_hDll = ::LoadLibrary(szName);
if
Two guesses from me
1. LoadLibrary calls the DllMain of the specified DLL (the first time you try and attach to your process). Long shot but is it there?
2. LoadLibrary will load the specified DLL and all it's dependencies. So if a dependant module of the DLL can't be located in the search path that will cause the load to fail - you can use depends.exe to check - available here