Original Post
I did not have this problem until I upgraded to DX9. Note that I made no changes to ANY of my DirectInput code.
Whenever I reset my display mode going from windowed mode to fullscreen mode, any call to Acquire() returns E_ACCESSDENIED, which is not documented in the SDK. This does not happen when resizing the window, changing between display modes, or switching from fullscreen to windowed. It also does not happen when you switch from fullscreen to windowed and BACK from windowed to fullscreen.
Any ideas? My code (ignore the ERR macros, I know they work):
// Get the keyboard.
ERR(kb->Unacquire(),
"Unable to unaquire the keyboard.");
kb->Release();
ERR(di->CreateDevice(GUID_SysKeyboard, &kb, NULL),
"Unable to create the keyboard device.");
ERR(kb->SetCooperativeLevel(handle_cur, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND),
"Unable to set the keyboard''s cooperation level.");
ERR(kb->SetDataFormat(&c_dfDIKeyboard),
"Unable to set the keyboard''s data format.");
ERR(kb->Acquire(),
"Unable to acquire the keyboard.");