Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WinUSB Error 1008

14 views
Skip to first unread message

Asaf Shelly

unread,
Dec 29, 2009, 1:59:01 AM12/29/09
to
Hi All,

I am using WinUSB via a .Net component written in C#.
Every first read I get error 1008 - ERROR_NO_TOKEN "An attempt was made to
reference a token that does not exist". This happens only the first time I
read after connecting the device.
No information in the system event logs.
The full source code is here:
http://www.asyncop.com/MTnPDirEnum.aspx?treeviewPath=%5bo%5d+Open-Source%5cWinUSB+Component (see at the bottom)

Any idea why 1008 may happen?

TIA,
Asaf

Tim Roberts

unread,
Dec 31, 2009, 12:24:47 AM12/31/09
to

That's the source code for the component, but not for the code in your app
that CALLS the component. That's what we need to see. Are you sure you
have the endpoint numbers right? Did you set the GUID in the component to
the GUID from your INF? What endpoints does your device have?
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Asaf Shelly

unread,
Dec 31, 2009, 3:05:01 AM12/31/09
to
Hi Tim,

The workaround was reading zero bytes:
winUSBDevice1.ReadBlocking(0);

Only the first read will fail 1008 and all the other operations work great
so the system is set up correctly. I also know that it is the first read
regardless of write, that nothing goes to the USB wire when the read fails
and that it is happening on several machines.

Thanks,
Asaf

0 new messages