Author Topic: about rawinput  (Read 8587 times)

clement2011

  • Member
  • ***
  • Posts: 19
about rawinput
« on: May 16, 2012, 04:37:09 am »
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:
Code: [Select]
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.



clement2011

  • Member
  • ***
  • Posts: 19
Re: about rawinput
« Reply #2 on: May 16, 2012, 10:49:40 pm »
Thanks a lot