Author Topic: How to avoid reading old report through HidD_GetInputReport  (Read 15573 times)

AshAll

  • Member
  • ***
  • Posts: 9
Hello everybody,

When requesting a new report, HidD_GetInputReport keep getting the old report which is troublesome because some of my requsts are same repeated command, this causes my program to exit before really get things done first.

I feel this maybe a question that has been asked before, Please help!

Ashall

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: How to avoid reading old report through HidD_GetInputReport
« Reply #1 on: May 16, 2011, 08:25:52 pm »
Make the ReadFile buffer big enough to hold all available reports and discard the older ones.

Jan

AshAll

  • Member
  • ***
  • Posts: 9
Re: How to avoid reading old report through HidD_GetInputReport
« Reply #2 on: May 16, 2011, 08:32:52 pm »
Hi, Jan,

Thanks for comment.

I am not using ReadFile, but using HidD_SetOutputReport. I find HidD_SetOutputReport always can return successfully, but could hold the old data. I feel though this might be normal?

Thanks again!

Ashall

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: How to avoid reading old report through HidD_GetInputReport
« Reply #3 on: May 17, 2011, 10:22:49 am »
Yes, you'll get the oldest report first.

Jan