Villacaleb / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

E_FAIL exception when using DirectInput.IsDeviceAttached on disconnected device #828

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the March 2011 SlimDX SDK I get the following DirectInputException after 
physically disconnecting a joystick device and invoking the 
DirectInput.IsDeviceAttached() method:

E_FAIL: An undetermined error occurred (-2147467259)

To reproduce, create a new Joystick object and start calling: 
directInput.IsDeviceAttached(joystick.Information.InstanceGuid)

Then disconnect the joystick from your PC, e.g. by pulling out the USB cable. 
The exception will be thrown immediately afterwards.

Maybe I'm not using this method correctly, but to my understanding it should 
simply return false and not throw an exception with an undetermined error.

This is on Windows 7 64-bit, using the x86 SlimDX library.

Original issue reported on code.google.com by arpa...@googlemail.com on 31 Aug 2011 at 9:19

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2135.

Original comment by Mike.Popoloski on 13 Sep 2011 at 4:04