From: mdjr on
Hello.

I assigned the "WinUSB" driver to a special mouse that has some special
features. (I do not want to use the mouse as mouse.)

Using WinUsb_ReadPipe I can read the data from the mouse - that works.

To access the special features I have to send "Set_Feature" USB requests
(Class, Interface, Data direction out) to the device.

The Set_Feature request (WinUsb_ControlTransfer) returns
GetLastError()=ROR_GEN_FAILURE.

I tested a Class, Interface, Data direction in request using
WinUsb_ControlTransfer:
WINUSB_SETUP_PACKET pkt={0xA1,1,0x100,0,8}; // Get_Report
Works correctly.

Now I tested another Class, Interface, Data direction out request:
WINUSB_SETUP_PACKET pkt={0x21,10,0,0,0}; // Set_Idle
Again I get ROR_GEN_FAILURE.

I'm sure the mouse supports the requests with the given parameters.

What may be wrong?

Martin

From: Doron Holan [MSFT] on
i assume you meant ERROR_GEN_FAILURE, not ROR_GEN_FAILURE. are you writing
to a different interface index than that of your device?

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"mdjr" <mdjr(a)discussions.microsoft.com> wrote in message
news:B23C4E79-6EF8-47FA-A559-0654D3E17929(a)microsoft.com...
> Hello.
>
> I assigned the "WinUSB" driver to a special mouse that has some special
> features. (I do not want to use the mouse as mouse.)
>
> Using WinUsb_ReadPipe I can read the data from the mouse - that works.
>
> To access the special features I have to send "Set_Feature" USB requests
> (Class, Interface, Data direction out) to the device.
>
> The Set_Feature request (WinUsb_ControlTransfer) returns
> GetLastError()=ROR_GEN_FAILURE.
>
> I tested a Class, Interface, Data direction in request using
> WinUsb_ControlTransfer:
> WINUSB_SETUP_PACKET pkt={0xA1,1,0x100,0,8}; // Get_Report
> Works correctly.
>
> Now I tested another Class, Interface, Data direction out request:
> WINUSB_SETUP_PACKET pkt={0x21,10,0,0,0}; // Set_Idle
> Again I get ROR_GEN_FAILURE.
>
> I'm sure the mouse supports the requests with the given parameters.
>
> What may be wrong?
>
> Martin
>