According to the SDK documentation, the "SI_DEVICE_CHANGE_EVENT is sent when a device is connected or disconnected from the system."
But I am not able to get that event from SpaceNavigator (FW: 4.35).
I have tried with the latest version (v10.4.10) on Windows 10 and with an older version on VMWare Windows 7 (version 10.2.9).
In both cases I have tried that in my .Net application that uses siapp.cs and also with the Demos\TestSiapp application that comes with the SDK.
Also, the old TDx.TDxInput library does not work in this case - the DeviceChange event is not fired.
It looks to me that the only way to get information if the device is disconnected is to call the SiGetDeviceInfo and if the value of devType in the returned class is 0 (Unknown), then the device was disconnected.
In case user connects the device, an SI_IS_EVENT event is sent and its type is 0 - if the device was disconnected before we can call SiGetDeviceInfo to confirm if device is now connected.
Is it ok to call SiGetDeviceInfo every few seconds after the last event to check if the device is disconnected?
Or is there another solution to get the SI_DEVICE_CHANGE_EVENT working.
Cannot get event when device is connected or disconnected
Moderator: Moderators
Re: Cannot get event when device is connected or disconnecte
Sending DeviceChange events are disabled by default in the cfg file that is used if there is no cfg file for your application (AppDefCfg_s80.xml).
If you create a cfg for your application, you can turn it on (true).
Code: Select all
<Options>
<IgnoreMouseWheelInertia>true</IgnoreMouseWheelInertia>
<SendDeviceChangeEvent>false</SendDeviceChangeEvent>
<UseSiOpenAppName>true</UseSiOpenAppName>
</Options>
Re: Cannot get event when device is connected or disconnecte
Moving topic to the Developer Forum.
Uta
3Dconnexion
3Dconnexion