After loading the DLL which is used in conjunction with some (large) code segment, the following code freezes my computer:
HOOKPROC hp = (HOOKPROC)GetProcAddress((HINSTANCE)hmodHook, "SpyGetMsgProc");
if (!(hhkGetMessage = SetWindowsHookEx(WH_GETMESSAGE, hp, (HINSTANCE)hmodHook, 0)))
DWORD err = GetLastError();
THe only way to free up my computer is to CTL+ALT+DEL and kill the application and Visual C++.
At first I thought that it was not finding the function inside the DLL but it gets a valid address not far off the library address.