When I use this code for DInput:
hr= (DirectInput8Create(0, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&lpdi, NULL));
if(FAILED(hr))
{
MessageBox(hWnd, "Error initializing DirectInput8 Keyboard Object!", 0, 0);
exit(1);
}
It pops up the Error Message when I run it. Are there any files I need?