u r able to compile my code and run it succesfully?

I get:

"Error"
"Device not acquired"

which is a custom message box I have set to pop up when my program tries to unaquire the direct input device.. in this case my KEYBOARD.

Then I get that microsoft error that wants me to send them my error info... This occurs everytime..

Direct input working fine while program is running and even after I click OK on these warnings windows seems to return to normal.. I have control of the keyboard.

Compiler says no errors or warnings. but then again its
Microsoft Toolkit 2003 free compiler... I'm stumped as to why this is occuring everytime..
Not preventing me from continue my project but a very annoying occurence and certainly not kosher... no idea why this keeps occuring?