In this post I said that I found a DLL source here to globally hook a key, but for some reason, all of a sudden this code here in KeyHelper.cs
public void Hook()
{
ProcessModule objCurrentModule = Process.GetCurrentProcess().MainModule;
keyboardProcess = new LowLevelKeyboardProc(CaptureKey);
ptrHook = SetWindowsHookEx(13, keyboardProcess, GetModuleHandle(objCurrentModule.ModuleName), 0);
}
provides the error in the title, and I'm not sure why as I haven't touched it, I've already rebuilt the DLL again to try, and fix it but its not working. I don't really know what else to try as I've never encountered this error before.