Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
Declare Function GetRawInputDeviceInfo Lib "user32.dll" (TODO) As TODO
User-Defined Types:
[StructLayout(LayoutKind.Explicit)]
public struct DeviceInfo
{
[FieldOffset(0)]
public int Size;
[FieldOffset(4)]
public int Type;
[FieldOffset(8)]
public DeviceInfoMouse MouseInfo;
[FieldOffset(8)]
public DeviceInfoKeyboard KeyboardInfo;
[FieldOffset(8)]
public DeviceInfoHID HIDInfo;
}
public struct DeviceInfoMouse
{
public uint ID;
public uint NumberOfButtons;
public uint SampleRate;
}
public struct DeviceInfoKeyboard
{
public uint Type;
public uint SubType;
public uint KeyboardMode;
public uint NumberOfFunctionKeys;
public uint NumberOfIndicators;
public uint NumberOfKeysTotal;
}
public struct DeviceInfoHID
{
public uint VendorID;
public uint ProductID;
public uint VersionNumber;
public ushort UsagePage;
public ushort Usage;
}
Alternative Managed API:
Do you know one? Please contribute it!
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
uint size = Marshal.SizeOf(typeof(User32.DeviceInfo));
User32.DeviceInfo di = new User32.DeviceInfo();
di.Size = Marshal.SizeOf(typeof(User32.DeviceInfo));
User32.GetRawInputDeviceInfo(device.hDevice, User32.RIDI_DEVICEINFO, ref di, ref size);
User32.DeviceInfo di = new User32.DeviceInfo();
di.Size = Marshal.SizeOf(typeof(User32.DeviceInfo));
User32.GetRawInputDeviceInfo(device.hDevice, User32.RIDI_DEVICEINFO, ref di, ref size);
The GetRawInputDeviceInfo function gets information about the raw input device.
5/12/2020 4:09:40 AM - kosia4enko.g@gmail.com-94.45.79.85
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).