07-28-2009, 05:18 AM
Join Date: Jul 2009
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | UsbClient-Device Communication
Please Login to Remove!
my question is to mark soham regarding the VC UsbClient and GCF connection of the BB appliaction.
i have made an java application which uses the VC UsbClient code as a dll it connects to the device and fetches some information and sends some information but the problem is some time this connection breaks and in the VC the event method virtual HRESULT STDMETHODCALLTYPE raw_OnClose( void ) does not fire every time , some time it does some time it does not on this event i have set up the boolean flag which actually indicates that the connection has been lost then i call device channel release() method and then makes it to NULL as it has been taught in the VC UsbClient demo.
therefore when i set the channel to NULL some time it hangs and does not come back which leads my application to hang.
_deviceChannel = NULL; // this is where it some time gets sleep and never comes back.
note : with out _deviceChannel->Release(); i face same issue.
am i missing some thing in the logic ?
how can i sustain the connection period longer it runs some time 30 minutes some time 2-3 or may be 4 hours and some time it disconnects in less than 1 minute.
is it because of device processor busy with other stuff ?
please help , thanks in advance.