   Error With Creating DirectInput Object
  Hi,I'm trying to use DirectInput for keyboard control in an assignment I'm working on, but I can't get past creating the DirectInput object. Here is what I have for that:HRESULT hr;// create an LPDIRECTINPUT8 object to hold the DirectInput objectLPDIRECTINPUT8 InputObject;// create the DirectInput objecthr = DirectInput8Create(hInst,DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&InputObject,NULL);// return false if creating the DI object failsif FAILED( hr )return false;I get no compiler error, but the program exits as soon as it starts running because it evidently must have failed.  I've looked over the code and tried to solve this for hours but I am not getting anywhere.  Can anyone tell me what I'm doing wrong?Thanks!   
  Check the meaning of the HRESULT value returned, what is it? There doesnt seem to be anything wrong with the way you are creating it, are you sure this is where/why its exiting? Have you ran it through the debugger?   ;  As an aside, Using DirectInput for keyboard or mouse input is an extremely bad idea, will cause you nothing but problems, and is not recommended by anything except crap website tutorials which seem to think that it's "faster".   