Author Topic: HID lost data  (Read 5073 times)

lcpoon

  • Frequent Contributor
  • ****
  • Posts: 58
HID lost data
« on: November 27, 2014, 03:39:45 am »
I am using "generichid_vb" to communicate with my device. FYI, my device always returns data whenever I send data to it.

If I send data to it and then purposely closed the VB app. When I re-opened the VB app and try to read data from it, the data is no longer there. I did try to comment out "MyHid.FlushQueue(hidHandle)" but the problem is still there.

With the VB app opened forever, I have no problem to send and to read data, even with a long delay in betweem send and read commands.

I suspected that the VB app kills all the pending queue when I launched it, please advise.


Tsuneo

  • Frequent Contributor
  • ****
  • Posts: 145
Re: HID lost data
« Reply #1 on: November 28, 2014, 08:25:20 am »
Quote
I suspected that the VB app kills all the pending queue when I launched it

it’s the feature of Windows HID driver.
When a PC application opens the HID driver, the driver assigns brand-new input buffer to the handle.

Tsuneo
« Last Edit: November 28, 2014, 08:34:01 am by Tsuneo »