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
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "INPUT" in [All]

coredll

.

    public IntPtr hStdInput;

.

static extern int ExtEscape (IntPtr hdc, uint nEscape, uint cbInput, byte[] lpszInData, int cbOutput, IntPtr lpszOutData);

.

        uint cbInput,

.

                          ByVal cbInput As Int32, _

.

        uint cbInput,

.
Summary
Retrieve a handle to the window that has captured mouse/stylus input.
.
Summary
Returns the input context associated with the specified window. - An application should routinely use this function to retrieve the current input context before attempting to access information in the context. (from msdn.microsoft.com)
.

IME is used to Convert Keyboad input to Local Language.

.

            // close IME(direct input for Alphabet and Number)

.

        /// <param name="lpInBuf">Pointer to the input buffer.</param>

.

static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

Declare Function SendInput Lib "coredll.dll" (TODO) As TODO

.

        public struct KEYBOARDINPUT

.

        public const uint INPUT_KEYBOARD = 1;

.

        public static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

        KEYBOARDINPUT[] inputs;

.

        inputs = new cTabControl.KEYBOARDINPUT[2];

.

        inputs[0].type = inputs[1].type = cTabControl.INPUT_KEYBOARD;

.

        inputs[0].wVk = inputs[1].wVk = cTabControl.VK_TAB;

.

        inputs[1].dwFlags = cTabControl.KEYEVENTF_KEYUP;

.

        retVal = cTabControl.SendInput(2, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        KEYBOARDINPUT[] inputs;

.

        inputs = new cTabControl.KEYBOARDINPUT[4];

.

        inputs[0].type = inputs[1].type = inputs[2].type = inputs[3].type = cTabControl.INPUT_KEYBOARD;

.

        inputs[0].wVk = inputs[3].wVk = cTabControl.VK_SHIFT;

.

        inputs[1].wVk = inputs[2].wVk = cTabControl.VK_TAB;

.

        inputs[2].dwFlags = inputs[3].dwFlags = cTabControl.KEYEVENTF_KEYUP;

.

        retVal = cTabControl.SendInput(4, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        KEYBOARDINPUT[] inputs;

.

        inputs = new cTabControl.KEYBOARDINPUT[4];

.

        inputs[0].type = inputs[1].type = inputs[2].type = inputs[3].type = cTabControl.INPUT_KEYBOARD;

.

        inputs[0].wVk = inputs[3].wVk = cTabControl.VK_CTRL;

.

        inputs[1].wVk = inputs[2].wVk = cTabControl.VK_TAB;

.

        inputs[2].dwFlags = inputs[3].dwFlags = cTabControl.KEYEVENTF_KEYUP;

.

        retVal = cTabControl.SendInput(4, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        KEYBOARDINPUT[] inputs;

.

        inputs = new cTabControl.KEYBOARDINPUT[6];

.

        inputs[0].type = inputs[1].type = inputs[2].type = inputs[3].type = inputs[4].type = inputs[5].type = cTabControl.INPUT_KEYBOARD;

.

        inputs[0].wVk = inputs[5].wVk = cTabControl.VK_CTRL;

.

        inputs[1].wVk = inputs[4].wVk = cTabControl.VK_SHIFT;

.

        inputs[2].wVk = inputs[3].wVk = cTabControl.VK_TAB;

.

        inputs[2].dwFlags = inputs[5].dwFlags = cTabControl.KEYEVENTF_KEYUP;

.

        retVal = cTabControl.SendInput(6, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.
Documentation
[SendInput] on MSDN
.

        /// <summary>If the calling thread and the thread that owns the window are attached to different input queues,

.
Summary
Set the Input Method
.

Microsoft.WindowsCE.Forms.InputPanel.CurrentInputMethod

.
Summary
This function shows or hides the currently active input panel window. An application must call this function to display the input panel and its current input method (taken from msdn2.microsoft.com)
.

There's the InputPanel control.

.

    inputPanel.Enabled = showIt;

.

    inputPanel.Enabled = !inputPanel.Enabled;

.

Main benefit of using this over the InputPanel is that there is no control to instantiate in the form initialization process. The main drawback is that you do not have access to the InputPanel.Bounds property. C++ TRUE indicates success. When this function fails, it returns an HRESULT error code.

.
Summary
The waveInClose function closes the given waveform-audio input device.
.
Summary
The waveInStop function stops waveform-audio input.

userenv

.

    /// <param name="env">The input environment</param>

iphlpapi

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "LocalAddress" -Value ([System.Net.IPAddress]::new($y[$i].localAddr).IPAddressToString)

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "RemoteAddress" -Value ([System.Net.IPAddress]::new($y[$i].remoteAddr).IPAddressToString)

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "LocalPort" -Value ($y[$i].localPort[1]+($y[$i].localPort[0]*0x100)+($y[$i].localPort[3]*0x1000)+($y[$i].localPort[2]*0x10000))

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "RemotePort" -Value ($y[$i].remotePort[1]+($y[$i].remotePort[0]*0x100)+($y[$i].remotePort[3]*0x1000)+($y[$i].remotePort[2]*0x10000))

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "PID" -Value $y[$i].owningPid

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "ProcessName" -Value ((Get-Process -Id $y[$i].owningPid).ProcessName)

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "StateValue" -Value $y[$i].state

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "State" -Value $StateList[$y[$i].state]

.

      Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "ServiceName" -Value $services[$j].Caption

.

      if ($boolNoService) { Add-Member -InputObject $objOutput -MemberType NoteProperty -Name "ServiceName" -Value $null }

.

    /// On input, specifies the size in bytes of the buffer pointed to by the pIfTable parameter.

.

        /// <param name="pdwSize">On input, specifies the size of the buffer pointed to

.

    /// <param name="cInFilters">[in] Specifies the number of input filter descriptions pointed to by the pfiltIn parameter.</param>

.

    /// <param name="pfiltIn">[in] Pointer to an array of filter descriptions to use as input filters.</param>

.

    /// <param name="inAction">[in] Specifies a default action for an input packet. This member can be one of the following values.</param>

.

    /// <param name="cInFilters">[in] Specifies the number of input filter descriptions pointed to by the pfiltIn parameter.</param>

.

    /// <param name="pfiltIn">[in] Pointer to an array of filter descriptions to use as input filters.</param>

.

    /// <param name="pInInterface">[in, optional] Handle to an interface to use as an input interface for the packet. This parameter is optional and may be NULL.</param>

shell32

.

        SEE_MASK_WAITFORINPUTIDLE = 0x02000000,

ntdll

.

SeUnsolicitedInputPrivilege = 5

gdiplus

.

static extern int GdiplusStartup(out IntPtr token, ref StartupInput input,

.

ByRef input As StartupInput, ByRef output As StartupOutput) As Integer

.

                       ByRef input As GdipStartupInput, _

.

struct StartupInput

hid

.
Summary
Removes any Input reports waiting in the buffer.
.

            result = HidP_GetValueCaps(HidP_Input, ref valueCaps[0], ref Capabilities.NumberInputValueCaps, preparsedDataPointer);

.

private static extern bool HidD_GetInputReport(SafeFileHandle HidDeviceObject, StringBuilder Buffer, uint BufferLength);

.

Declare Function HidD_GetInputReport Lib "hid.dll" (TODO) As TODO

.
Documentation
[HidD_GetInputReport] on MSDN
.

private static extern bool HidD_GetNumInputBuffers(SafeFileHandle HidDeviceObject, ref uint NumberBuffers);

.

Declare Function HidD_GetNumInputBuffers Lib "hid.dll" (TODO) As TODO

.
Documentation
[HidD_GetNumInputBuffers] on MSDN
.

private static extern bool HidD_SetNumInputBuffers(SafeFileHandle HidDeviceObject, uint BufferLength);

.

Declare Function HidD_SetNumInputBuffers Lib "hid.dll" (TODO) As TODO

.
Documentation
[HidD_SetNumInputBuffers] on MSDN
.

      UInt16 InputReportByteLength;

.

      UInt16 NumberInputButtonCaps;

.

      UInt16 NumberInputValueCaps;

.

      UInt16 NumberInputDataIndices;

.

InputReportByteLength

.

Specifies the maximum size, in bytes, of all the input reports (including the report ID, if report IDs are used, which is prepended to the report data).

.

NumberInputButtonCaps

.

Specifies the number of input HIDP_BUTTON_CAPS structures that HidP_GetButtonCaps returns.

.

NumberInputValueCaps

.

Specifies the number of input HIDP_VALUE_CAPS structures that HidP_GetValueCaps returns.

.

NumberInputDataIndices

.

Specifies the number of data indices assigned to buttons and values in all input reports.

.

Callers of the HIDClass support routines use the information provided in this structure when a called routine requires, as input, the size of a report type, the number of link collection nodes, the number of control capabilities, or the number of data indices.

httpapi

.

     IntPtr pInputConfigInfo,

.

     int InputConfigInfoLength,

.

Depending on the value of ConfigId, both pInputConfigInfo and pOutputConfigInfo should point to a different type of structure. If it wasn't for this, I could redifine the PInvoke signature to explicitly specify the underlying structure type.

.
ConfigId Value InputConfigInfor Structure Type
.
HttpServiceConfigIPListenList No input data; set to NULL.
.

     HTTP_SERVICE_CONFIG_URLACL_QUERY inputConfigInfoQuery = new HTTP_SERVICE_CONFIG_URLACL_QUERY();

.

     inputConfigInfoQuery.QueryDesc = HTTP_SERVICE_CONFIG_QUERY_TYPE.HttpServiceConfigQueryExact;

.

     inputConfigInfoQuery.KeyDesc = keyDesc;

.

     inputConfigInfoQuery.dwToken = 0;

.

     IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_QUERY)));

.

     Marshal.StructureToPtr(inputConfigInfoQuery, pInputConfigInfo, true);

.

     size = Marshal.SizeOf(inputConfigInfoQuery);

.

         pInputConfigInfo,

.

         Marshal.SizeOf(inputConfigInfoQuery),

.

         pInputConfigInfo,

.

         Marshal.SizeOf(inputConfigInfoQuery),

.

     HTTP_SERVICE_CONFIG_URLACL_SET inputConfigInfoSet = new HTTP_SERVICE_CONFIG_URLACL_SET();

.

     inputConfigInfoSet.KeyDesc = keyDesc;

.

     inputConfigInfoSet.ParamDesc = paramDesc;

.

     IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_URLACL_SET)));

.

     Marshal.StructureToPtr(inputConfigInfoSet, pInputConfigInfo, false);

.

         pInputConfigInfo,

.

         Marshal.SizeOf(inputConfigInfoSet),

.

         pInputConfigInfo,

.

         Marshal.SizeOf(inputConfigInfoSet),

.

             pInputConfigInfo,

.

             Marshal.SizeOf(inputConfigInfoSet),

.

     Marshal.FreeCoTaskMem(pInputConfigInfo);

.

        IntPtr pInputConfigInfo = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(HTTP_SERVICE_CONFIG_SSL_SET)));

.

        Marshal.StructureToPtr(configSslSet, pInputConfigInfo, false);

.

            pInputConfigInfo,

.

            pInputConfigInfo,

.

                pInputConfigInfo,

.

        Marshal.FreeCoTaskMem(pInputConfigInfo);

secur32

.

                    ref SecBufferDesc pInput,

.

    IntPtr pInput, //PSecBufferDesc SecBufferDesc

.

    ByVal pInput As IntPtr, _

.

    IntPtr pInput, //PSecBufferDesc SecBufferDesc

.

                                                ref SecBufferDesc pInput,

.

                                                ref SecBufferDesc pInput,

.

                        ref ClientToken,            // [in] pointer to the input buffers

.

                        ref ClientToken,            // [in] pointer to the input buffers

shlwapi

.

/// If there are no arguments in the path, the function returns a pointer to the end of the input string.

.

''' If there are no arguments in the path, the function returns a pointer to the end of the input string.

.

This is similar, but not identical, to Path.GetFileName. If the input string ends with a directory, the directory is returned rather than nothing; for example, "C:\foo\" becomes "foo\", "C:" stays "C:".

ncrypt

.

                [MarshalAs(UnmanagedType.LPArray)] byte[] pbInput,

.

                int cbInput,

.

            [MarshalAs(UnmanagedType.LPArray)] byte[] pbInput,

.

            int cbInput,

.

    IntPtr pbInputByteArray,

.

    int cbInput,

.

  When the input is a 4 byte DWORD; you may also use this:

.

                            ref int pbInput,

.

                            int cbInput,

Interfaces

.

    Implements IInputObject

.

    Protected BandObjectSite As IInputObjectSite

.

    BandObjectSite = DirectCast(pUnkSite, IInputObjectSite)

.

    Public Overridable Sub UIActivateIO(fActivate As Int32, ByRef Msg As MSG) Implements IInputObject.UIActivateIO

.

    Public Overridable Function HasFocusIO() As Int32 Implements IInputObject.HasFocusIO

.

    Public Overridable Function TranslateAcceleratorIO(ByRef msg As MSG) As Int32 Implements IInputObject.TranslateAcceleratorIO

.

    BandObjectSite.OnFocusChangeIS(TryCast(Me, IInputObject), 1)

.

        BandObjectSite.OnFocusChangeIS(TryCast(Me, IInputObject), 0)

.

Public Interface IInputObject

.

Public Interface IInputObjectSite

.

    Implements IInputObject

.

    Protected BandObjectSite As IInputObjectSite

.

    BandObjectSite = DirectCast(pUnkSite, IInputObjectSite)

.

    Public Overridable Sub UIActivateIO(fActivate As Int32, ByRef Msg As MSG) Implements IInputObject.UIActivateIO

.

    Public Overridable Function HasFocusIO() As Int32 Implements IInputObject.HasFocusIO

.

    Public Overridable Function TranslateAcceleratorIO(ByRef msg As MSG) As Int32 Implements IInputObject.TranslateAcceleratorIO

.

    BandObjectSite.OnFocusChangeIS(TryCast(Me, IInputObject), 1)

.

        BandObjectSite.OnFocusChangeIS(TryCast(Me, IInputObject), 0)

.

Public Interface IInputObject

.

Public Interface IInputObjectSite

.
Summary
The IInputObjectSite interface is used to communicate focus changes for a user input object contained in the Shell.
.

public interface IInputObjectSite

.
Documentation
[IInputObjectSite] on MSDN
.

            /// <param name="pvaIn">Input arguments</param>

.

        /// <param name="vaIn">Input Arguments</param>

.

    /// <param name="hwnd">If user input is required to perform the enumeration, this window handle should be used by the enumeration object as the parent window to take user input.</param>

.

      ///virtual HRESULT STDMETHODCALLTYPE GetInputProcessorProfiles(

.

      ///    /* [out] */ ITfInputProcessorProfiles **ppaip,

.

      int GetInputProcessorProfiles(uint dwThreadId, ref IUnknown ppaip, ref uint pdwThreadId);

.

      ///virtual HRESULT STDMETHODCALLTYPE SetModalInput(

.

      int SetModalInput(IUnknown pSink, uint dwThreadId, uint dwFlags);

user32

.

/// <summary>Sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process. The input locale identifier specifies a locale as well as the physical layout of the keyboard</summary>

.

/// <param name="hkl">Input locale identifier to be activated.</param>

.

/// <param name="Flags">Specifies how the input locale identifier is to be activated.</param>

.

/// <returns>The return value is of type HKL. If the function succeeds, the return value is the previous input locale identifier. Otherwise, it is zero</returns>

.

''' <summary>Sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process. The input locale identifier specifies a locale as well as the physical layout of the keyboard</summary>

.

''' <param name="hkl">Input locale identifier to be activated.</param>

.

''' <param name="Flags">Specifies how the input locale identifier is to be activated.</param>

.

''' <returns>The return value is of type HKL. If the function succeeds, the return value is the previous input locale identifier.

.

[System.Windows.Forms.InputLanguage]

.

- The process received the last input event.

.
Summary
.

static extern bool AttachThreadInput(uint idAttach, uint idAttachTo,

.

Public Shared Function AttachThreadInput(ByVal idAttach As System.UInt32, ByVal idAttachTo As System.UInt32, ByVal fAttach As Boolean) As Boolean

.
Documentation
[AttachThreadInput] on MSDN
.
Summary
.

static extern bool BlockInput(bool fBlockIt);

.

Declare Function BlockInput Lib "user32" (ByVal fBlockIt As Boolean) As Boolean

.

    ''' <summary>The BlockInput function blocks keyboard and mouse input events from reaching applications

.

    ''' and mouse input events are blocked. If this parameter is zero, keyboard and mouse events are unblocked.

.

    ''' If input is already blocked, the return value is zero.

.

    ''' <remarks>Note that only the thread that blocked input can successfully unblock input</remarks>

.

    <DllImport("user32.dll", EntryPoint:="BlockInput", SetLastError:=True, CharSet:=CharSet.Auto, CallingConvention:=CallingConvention.StdCall)>

.

    Friend Shared Function BlockInput(fBlockIt As Boolean) As Integer

.

Note that this definition does not use Boolean input and return types

.

Blocks or unblocks mouse and keyboard input.

.

Useful to create a temporary block in input for sensitive GUI operations. For instance when manually activating a screen saver from within a GUI function, a short blocking delay will prevent the user mouse movements directly after selection from accidently escaping the screen saver.

.

Class BlockInput

.

    <DllImport("user32.dll", EntryPoint:="BlockInput", SetLastError:=True, CharSet:=CharSet.Auto, CallingConvention:=CallingConvention.StdCall)>

.

    Friend Shared Function BlockInput(fBlockIt As Boolean) As Boolean

.

   Friend Shared Function DisableInput(makeDisabled As Boolean) as Boolean

.

      Return BlockInput(makeDisabled)

.

The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides an InputBlocker class that can block input.

.
Documentation
[BlockInput] on MSDN
.

        void EnableInput(Control control, bool enabled)

.

Windows Input Simulator

.

An open source managed .NET wrapper written in C# is available on Codeplex at http://inputsimulator.codeplex.com/. It has all of these definitions complete with documented code comments and can be used to determine key states as well. Thanks to all the contributors at pinvoke.

.

                     //    CURSOR_SUPPRESSED    (Windows 8 and above.) The cursor is suppressed. This flag indicates that the system is not drawing the cursor because the user is providing input through touch or pen instead of the mouse.

.

'&HF = control ID for text area (classname: "Edit") for inputting text

.
Summary
.

static extern bool GetInputState();

.

       if ( !GetInputState() )

.
Documentation
[GetInputState] on MSDN
.

Windows Input Simulator

.

An open source managed .NET wrapper written in C# is available on Codeplex at http://inputsimulator.codeplex.com/. It has all of these definitions complete with documented code comments and can be used to determine key states as well. Thanks to all the contributors at pinvoke.

.
Summary
Gets the time of the last user input (in ms since the system started)
.

static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);

.

Shared Function GetLastInputInfo(ByRef plii As LASTINPUTINFO) As Boolean

.

static bool GetLastInputInfo(LASTINPUTINFO* plii);

.

   type LastInputInfo = {

.

   extern int GetLastInputInfo(LastInputInfo& lpi);

.

LASTINPUTINFO

.

Compare to Environment.TickCount to get the time since the last user input.

.

This function retrieves the time in seconds since last user input

.

    static uint GetLastInputTime()

.

        LASTINPUTINFO lastInputInfo = new LASTINPUTINFO();

.

        lastInputInfo.cbSize = (uint)Marshal.SizeOf( lastInputInfo );

.

        lastInputInfo.dwTime = 0;

.

        if ( GetLastInputInfo( ref lastInputInfo ) )

.

        uint lastInputTick = lastInputInfo.dwTime;

.

        idleTime = envTicks - lastInputTick;

.

This function retrieves the time in seconds since last user input

.

Dim lastInputInf As New LASTINPUTINFO()

.

   Public Function GetLastInputTime() As Integer

.

    lastInputInf.cbSize = Marshal.SizeOf(lastInputInf)

.

    lastInputInf.dwTime = 0

.

    If GetLastInputInfo(lastInputInf) Then

.

        idletime = Environment.TickCount - lastInputInf.dwTime

.

This function retrieves the time in seconds since last user input

.

    LASTINPUTINFO lastInputInfo;

.

    lastInputInfo.cbSize = (UInt32)Marshal::SizeOf(lastInputInfo);

.

    lastInputInfo.dwTime = 0;

.

    if (GetLastInputInfo(&lastInputInfo))

.

        int lastInputTicks = (int)lastInputInfo.dwTime;

.

        idleTicks = systemUptime - lastInputTicks;

.

     let size = Marshal.SizeOf (typeof<LastInputInfo>)

.

     match GetLastInputInfo(&info) with

.

Prints time in seconds since last user input.

.

    LASTINPUTINFO lastInputInfo;

.

    lastInputInfo.cbSize = sizeof (lastInputInfo);

.

    lastInputInfo.dwTime = 0;

.

    if (GetLastInputInfo(&lastInputInfo)) {        

.

        int lastInputTicks = (int)lastInputInfo.dwTime;

.

        idleTicks = systemUptime - lastInputTicks;

.
Documentation
[GetLastInputInfo] on MSDN
.

The WM_KEYFIRST and WM_KEYLAST constants can be used as filter values to retrieve all messages related to keyboard input; the WM_MOUSEFIRST and WM_MOUSELAST constants can be used to retrieve all mouse messages. If the wMsgFilterMin and wMsgFilterMax parameters are both zero, the GetMessage function returns all available messages (that is, without performing any filtering).

.

        QS_RAWINPUT =       0x0400,

.

        QS_INPUT = (QS_MOUSE | QS_KEY | QS_RAWINPUT),

.

        QS_ALLEVENTS = (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY),

.

        QS_ALLINPUT = (QS_INPUT | QS_POSTMESSAGE | QS_TIMER | QS_PAINT | QS_HOTKEY | QS_SENDMESSAGE)

.
Summary
Function to read raw data from an input device such as a keyboard, mouse or other HID.
.

    /// Function to retrieve raw input data.

.

    /// <param name="hRawInput">Handle to the raw input.</param>

.

    /// <param name="pData">Raw input data.</param>

.

    public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, out RAWINPUT pData, ref int pcbSize, int cbSizeHeader);

.

    /// Function to retrieve raw input data.

.

    /// <param name="hRawInput">Handle to the raw input.</param>

.

    /// <param name="pData">Raw input data.</param>

.

    public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, byte[] pData, ref int pcbSize, int cbSizeHeader);

.

    <DllImport("user32.dll", CharSet:=CharSet.Auto, EntryPoint:="GetRawInputData", SetLastError:=True)>