I tried to write a rawinput windows form to show the usb device raw data.
The problem I meet is I can not make sure how to set up the RAWINPUTDEVICE when calling RegisterRawInputDevices
the codes is as following:
RAWINPUTDEVICE[] rp= new RAWINPUTDEVICE[1];
rp[0].usUsagePage = 0x01;
rp[0].usUsage = 0x06;
rp[0].dwFlags = RIDEV_INPUTSINK;
rp[0].hwndTarget = hwnd;
RegisterRawInputDevices( rp, (uint)rp.Length, (uint)Marshal.SizeOf( rp[0] ))
The problem is if I i can not make sure the device is mouse or keyboard, how to set up each parameter
of RAWINPUTDEVICE, and can rawinput can get other device except mouse, keyboard and joystick,
Thanks.