Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "RAWINPUTDEVICE" in [All]

Structures

.

public struct RAWINPUTDEVICE

.

    public RawInputDeviceFlags Flags;

.

Public Structure RAWINPUTDEVICE

.

    Public Flags As RawInputDeviceFlags

.

HIDUsagePage, HIDUsage, RawInputDeviceFlags

.
Documentation
[RAWINPUTDEVICE] on MSDN

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);

.
Documentation
.
Summary
The GetRawInputDeviceInfo function gets information about the raw input device.
.

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

.
Documentation
[GetRawInputDeviceInfo] on MSDN
.
Summary
The GetRawInputDeviceList function enumerates the raw input devices attached to the system.
.

    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);

.
Documentation
[GetRawInputDeviceList] on MSDN
.

/// <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

.

        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)));

.
Documentation
[RegisterRawInputDevices] on MSDN

Enums

.
Summary
Enumeration containing HID usage pages for use with RAWINPUTDEVICE.
.
Summary
Enumeration containing HID usage pages for use with RAWINPUTDEVICE.
.
Summary
.

public enum RawInputDeviceFlags

.

Public Enum RawInputDeviceFlags

.
Documentation
[RawInputDeviceFlags] on MSDN

 
Access PInvoke.net directly from VS: