Desktop Functions: Smart Device Functions:
|
Search Results for "RAWINPUTDEVICE" in [All]Structures
public struct RAWINPUTDEVICE
public RawInputDeviceFlags Flags;
Public Structure RAWINPUTDEVICE
Public Flags As RawInputDeviceFlags HIDUsagePage, HIDUsage, RawInputDeviceFlags user32
public static extern uint GetRawInputDeviceInfo(int deviceHandle, uint command, ref DeviceInfo data, ref uint dataSize);
Declare Function GetRawInputDeviceInfo Lib "user32.dll" (TODO) As TODO
User32.GetRawInputDeviceInfo(device.hDevice, User32.RIDI_DEVICEINFO, ref di, ref size);
static extern uint GetRawInputDeviceInfo(IntPtr hDevice, uint uiCommand, IntPtr pData, ref uint pcbSize);
Declare Function GetRawInputDeviceInfo Lib "user32.dll" Alias "GetRawInputDeviceInfoW" (ByVal hDevice As IntPtr, ByVal uiCommand As DeviceInfoTypes, ByVal pData As IntPtr, ByRef pcbSize As UInteger) As Integer
public enum RawInputDeviceType : uint
public struct RAWINPUTDEVICELIST
public RawInputDeviceType Type;
public static extern uint GetRawInputDeviceList
[In, Out] RAWINPUTDEVICELIST[] RawInputDeviceList,
uint Size /* = (uint)Marshal.SizeOf(typeof(RawInputDeviceList)) */
Public Structure RAWINPUTDEVICELIST
EntryPOint:="GetRawInputDeviceList", SetLastError:=True)> _
Public Function GetRawInputDeviceList(ByVal pRawInputDeviceList As
Declare Function GetRawInputDeviceList Lib "user32.dll" (ByVal pRawInputDeviceList As
int structSize = Marshal.SizeOf(typeof(RAWINPUTDEVICELIST));
int deviceCount = GetRawInputDeviceList(buffer, ref bufferCount, structSize);
RAWINPUTDEVICELIST device = (RAWINPUTDEVICELIST)Marshal.PtrToStructure(
new IntPtr((buffer.ToInt32() + (structSize * i))),typeof(RAWINPUTDEVICELIST));
public static RAWINPUTDEVICELIST[] GetAllRawDevices()
uint dwSize = (uint)Marshal.SizeOf(typeof(RAWINPUTDEVICELIST));
uint retValue = Win32API.GetRawInputDeviceList(null, ref deviceCount, dwSize);
RAWINPUTDEVICELIST[] deviceList = new RAWINPUTDEVICELIST[deviceCount];
retValue = Win32API.GetRawInputDeviceList(deviceList, ref deviceCount, dwSize);
//IntPtr pRawInputDeviceList = Marshal.AllocHGlobal((int)(dwSize * deviceCount));
//Marshal.FreeHGlobal(pRawInputDeviceList);
/// <param name="pRawInputDevices">Array of raw input devices.</param>
/// <param name="cbSize">Size of the RAWINPUTDEVICE structure.</param>
public static extern bool RegisterRawInputDevices([MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)] RAWINPUTDEVICE[] pRawInputDevices, int uiNumDevices, int cbSize);
''' <param name="pRawInputDevices">Array of raw input devices.</param>
''' <param name="cbSize">Size of the RAWINPUTDEVICE structure.</param>
Public Shared Function RegisterRawInputDevices(<MarshalAs(UnmanagedType.LPArray, SizeParamIndex := 0)> ByVal pRawInputDevices As RAWINPUTDEVICE(), ByVal uiNumDevices As Integer, ByVal cbSize As Integer) As Boolean
RAWINPUTDEVICE device;
device.Flags = RawInputDeviceFlags.InputSink;
Win32API.RegisterRawInputDevices(device);
public static bool RegisterRawInputDevices(RAWINPUTDEVICE device)
RAWINPUTDEVICE[] devices = new RAWINPUTDEVICE[1]; // Raw input devices.
return RegisterRawInputDevices(devices, 1, Marshal.SizeOf(typeof(RAWINPUTDEVICE))); Enums6: HIDUsage
7: HIDUsagePage
|