Register | Login

Quick search in Advantech Support Portal 
Print

[Technical Inquiry] usb 4716 plug/unplug notification

usb 4716 plug/unplug notification

I'm using BionicDAQ driver and SDK (native API) for usb 4716 module and trying to detect
device insertion and removal using WM_DEVICECHANGE message, DBT_DEVICEARRIVAL,  DBT_DEVTYP_DEVICEINTERFACE and so on .

I've obtain 4716 device interface GUID, and with its help, I'm now receiving device insertion and removal notifications in my program.

But I get strange 0xC0000005 exception somewhere in Bio4716.dll when using this sort of notification.

I start program with unplugged module and call AdxDeviceOpen(...).
It return BioErrorUndefined  (0xE000FFFF).
Now I plug module, receive arrival message, call AdxDeviceOpen(...) again, and get BioSuccess from it.
The program continues to work for a few seconds and crashed with 0xC0000005 exception without any interference from me after successful second AdxDeviceOpen() call.

Please explain me, is it my fault?
Or may be some restriction exist for using this type of notification with USB4716 bionic driver?
Thank you.

P.S. I know about EvtDeviceRemoved/EvtDeviceReconnected device events from Bionic SDK, and if there is a possibility to detect first device insertion wthout polling AdxDeviceOpen() function - it would be great.

[ Last edited by noosooth at 2010-7-29 21:29 ]
Share |

TOP