hi all,
During the USB device design, a problem confused me.
I want to get the handle of the USB device, and the symbolicname
of this USB device in register, like following:
??\USB#Vid_xx&Pid_xx#x&xx&x&x#{xxx…}
somebody told me, this symbolicname can be used in
CreateFile to create the handle.
After some tests (by change the symbolicname into the right
form), I can use the “new” symbolicname in createfile, and
the return handle is VALID_HANDLE.
I want to know, is this symbolicname the right parameter
in CreateFile?
And the handle is which handle? Can this handle be used
to communicate with the USB device? If it can, how?
xxxxx@gmail.com wrote:
During the USB device design, a problem confused me.
I want to get the handle of the USB device, and the symbolicname
of this USB device in register, like following:
??\USB#Vid_xx&Pid_xx#x&xx&x&x#{xxx…}
somebody told me, this symbolicname can be used in
CreateFile to create the handle.
After some tests (by change the symbolicname into the right
form), I can use the “new” symbolicname in createfile, and
the return handle is VALID_HANDLE.
I want to know, is this symbolicname the right parameter
in CreateFile?
And the handle is which handle? Can this handle be used
to communicate with the USB device? If it can, how?
You can certainly send ioctls to the handle. However, you can’t know
which ioctls to send and what effect they will have unless you know
about the driver that is being used. There is no “generic” USB ioctl
set, the way there is on Linux. It’s entirely up to the driver. In
that sense, it’s just like opening any other arbitrary device. You can
do it, but that doesn’t mean it is useful.
What are you trying to do?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.