Original Post
I have a super mario 3 clone I have been working on and in the process have upgraded from visual studio 6 to 2005 (version 8). The project will still build and run, but now keyboard input does not work at all, when it used to work fine. This is basically how I am handling input: //Variables LPDIRECTINPUT8 lpdi; LPDIRECTINPUTDEVICE8 keyboard; LPDIRECTINPUTDEVICE8 mouse; //Initialization DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&lpdi, NULL); //Keyboard lpdi->CreateDevice(GUID_SysKeyboard, &keyboard, NULL); keyboard->SetDataFormat(&c_dfDIKeyboard); keyboard->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND); keyboard->Acquire(); //Mouse lpdi->CreateDevice(GUID_SysMouse, &mouse, NULL); mouse->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND); mouse->SetDataFormat(&c_dfDIMouse); mouse->Acquire(); //Usage keyboard->GetDeviceState(sizeof(keys),&keys); mouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&mousestate); If I throw in a quick check around keyboard->SetCooperativeLevel I find out that that function is returning an error... but I don't know why