   DirectInput Keyboard Errors
  I'm making an expandable engine that keeps giving me errors when I input a key code into it.void GetKeys(UCHAR* KeyState){dinkeyboard->Acquire();dinkeyboard->GetDeviceState(sizeof(UCHAR[256]), (LPVOID)keystate);for(int Index = 0; Index < 256; Index++)*(KeyState + Index) &= 0x80;return;}if (GetKeys(DIK_ESCAPE) & 0x80){PostMessage(hWnd, WM_DESTROY, 0, 0);}those are obviously in separate .cpp files. However it keeps giving me an error that states: error C2664: 'GetKeys' : cannot convert parameter 1 from 'int' to 'UCHAR *'   
  Your function seems a very complicated version of GetAsyncKeyState. AFAIK, DirectInput is deprecated in favour of standard Win32 input handling. More about this from Evil Steve.   ;  1. Your GetKeys function takes a keyboard state as a parameter, but you're passing in a single character.2. What is your keystate variable declared as? It has different case from KeyState, and is a different variable.3. PostMessage() is not the correct way to destroy your window for a large number of reasons. The best case is that your code crashes on your machine. The worst case is that your code crashes on some future version of Windows which doesn't expect you to be breaking things in that way. The correct thing to do is to call DestroyWindow().4. As rip-off said, DirectInput for keyboard input is a brilliant way of wasting hours of your life, infuriating users, and stopping your app from running correctly on any keyboard layout apart from the one you happen to be using.   