I have try to use Raw Input from this http://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard
I develop on windows 7 64 bit
with .net 4.0
and Visual Studio 2010
it work perfectly in windows 7 but after I test the program on windows XP service pack 3 32&64 bit
, it cannot register input device. It might be some mistake at this step for Windows XP but in Windows 7 it work well.
if(!Win32.RegisterRawInputDevices(rid, (uint)rid.Length, (uint)Marshal.SizeOf(rid[0])))
{
throw new ApplicationException("Failed to register raw input device(s).");
}
in Win32 import User32.dll like this
[DllImport("User32.dll", SetLastError = true)]
internal static extern bool RegisterRawInputDevices(RawInputDevice[] pRawInputDevice, uint numberDevices, uint size);
How can I make it work with windows XP.