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]

oleaut32

.

    Public Function ImageToPictureDisp(Input As Bitmap) As stdole.IPictureDisp

.

    Dim PictDesc As PICTDESC = New PICTDESC(Input.GetHbitmap())

misc

2: FAQ
.
Question
How can I fetch a parameterized message from an externalized ".mc" resource file using FormatMessage function ? What is the va* arguments parameter that the FormatMessage API takes as an input and how do I pass this parameter in C# ?

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

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:".

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.

ntdsapi

.

The success of the name conversion request depends on where the client is bound. Clients bind to specific instances of the directory service using some variant of DsBind. If bound to a global catalog, the scope of the name mapping is the entire forest. If not bound to a global catalog, the scope of the name mapping is the domain not covered by a global catalog for that domain controller. If not bound to a global catalog and a name is not found, but the input name unambiguously identifies its domain and this domain is in the forest, then the return data identifies the DNS domain name for the domain of interest. Clients are expected to use this data to bind to the correct domain controller or global catalog and call DsCrackNames again with the new bind handle.

.

The return value from DsCrackNames indicates errors such as invalid parameters or insufficient memory. However, problems in converting individual names are reported in the status member of the DS_NAME_RESULT_ITEM structure returned for each input name.

.

      // Input name mapped to more than one output name.

.

      // Input name found, but not the associated output format.

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

kernel32

.

    // http://pinvoke.net/default.aspx/kernel32/FlushConsoleInputBuffer.html

.

    static extern bool FlushConsoleInputBuffer(

.

        IntPtr hConsoleInput

.

    // http://pinvoke.net/default.aspx/kernel32/GetNumberOfConsoleInputEvents.html

.

    static extern bool GetNumberOfConsoleInputEvents(

.

        IntPtr hConsoleInput,

.

    // http://pinvoke.net/default.aspx/kernel32/PeekConsoleInput.html

.

    static extern bool PeekConsoleInput(

.

        IntPtr hConsoleInput,

.

        [Out] INPUT_RECORD[] lpBuffer,

.

        IntPtr hConsoleInput,

.

    // http://pinvoke.net/default.aspx/kernel32/ReadConsoleInput.html

.

    [DllImport("kernel32.dll", EntryPoint = "ReadConsoleInputW", CharSet = CharSet.Unicode)]

.

    static extern bool ReadConsoleInput(

.

        IntPtr hConsoleInput,

.

        [Out] INPUT_RECORD[] lpBuffer,

.

    // http://pinvoke.net/default.aspx/kernel32/WriteConsoleInput.html

.

    static extern bool WriteConsoleInput(

.

        IntPtr hConsoleInput,

.

        INPUT_RECORD[] lpBuffer,

.

    public struct INPUT_RECORD

.

        uint nInBufferSize,                            // input buffer size

.

     hStdInput as IntPtr

.

       Dim bBuffer As Byte       ' Input buffer.

.
Summary
.

static extern bool FlushConsoleInputBuffer(IntPtr hConsoleInput);

.

This code segment will allow you to grab the Console input buffer using CreateFileW and Flush the input using FlushConsoleInputBuffer

.

  private static extern bool FlushConsoleInputBuffer(IntPtr hConsoleInput);

.

  private static extern IntPtr GetInputBuffer(

.

  //C# method to flush console input

.

    //"CONIN$" will allow you to grab the input buffer regardless if it is being redirected.

.

    IntPtr inBuffer = GetInputBuffer("CONIN$", 0x40000000 | 0x80000000,

.

    //throw an error if the input buffer is not obtained

.

    FlushConsoleInputBuffer(inBuffer);

.
Documentation
[FlushConsoleInputBuffer] on MSDN
.

    /* Retrieves the input code page used by the console associated with the calling process.

.

        A console uses its input code page to translate keyboard input into the corresponding character value. */

.

System.Console.InputEncoding.CodePage

.

        ENABLE_PROCESSED_INPUT = 0x0001,

.

        ENABLE_LINE_INPUT = 0x0002,

.

        ENABLE_ECHO_INPUT = 0x0004,

.

        ENABLE_WINDOW_INPUT = 0x0008,

.

        ENABLE_MOUSE_INPUT = 0x0010,

.

    private enum ConsoleInputModes : uint

.

        ENABLE_PROCESSED_INPUT = 0x0001,

.

        ENABLE_LINE_INPUT = 0x0002,

.

        ENABLE_ECHO_INPUT = 0x0004,

.

        ENABLE_WINDOW_INPUT = 0x0008,

.

        ENABLE_MOUSE_INPUT = 0x0010,

.

    ENABLE_PROCESSED_INPUT = &H1

.

    ENABLE_LINE_INPUT = &H2

.

    ENABLE_ECHO_INPUT = &H4

.

    ENABLE_WINDOW_INPUT = &H8

.

    ENABLE_MOUSE_INPUT = &H10

.

    /// <returns>The long path.  Null or empty if the input is null or empty.</returns>

.

/// The ToLongName function retrieves the long file name form of a specified short input path

.

/// The ToLongPathNameToShortPathName function retrieves the short path form of a specified long input path

.

      public IntPtr hStdInput;

.

const int STD_INPUT_HANDLE = -10;

.
Summary
.

       /* Reads data from the specified console input buffer without removing it from the buffer. */

.

    [DllImport("kernel32.dll", EntryPoint = "PeekConsoleInputW", CharSet = CharSet.Unicode, SetLastError = true)]

.

    internal static extern BOOL PeekConsoleInput(

.

        IntPtr hConsoleInput,

.

        [MarshalAs(UnmanagedType.LPArray), Out] INPUT_RECORD[] lpBuffer,

.
Documentation
[PeekConsoleInput] on MSDN
.
Summary
.

[DllImport("kernel32.dll",EntryPoint="ReadConsoleInputW",CharSet=CharSet.Unicode)]

.

static extern bool ReadConsoleInput(

.

        IntPtr hConsoleInput,

.

        [Out] INPUT_RECORD [] lpBuffer,

.
  • INPUT_RECORD
.
Documentation
[ReadConsoleInput] on MSDN
.

        ENABLE_PROCESSED_INPUT = 0x0001,

.

        ENABLE_LINE_INPUT = 0x0002,

.

        ENABLE_ECHO_INPUT = 0x0004,

.

        ENABLE_WINDOW_INPUT = 0x0008,

.

        ENABLE_MOUSE_INPUT = 0x0010,

.

    private enum ConsoleInputModes : uint

.

        ENABLE_PROCESSED_INPUT = 0x0001,

.

        ENABLE_LINE_INPUT = 0x0002,

.

        ENABLE_ECHO_INPUT = 0x0004,

.

        ENABLE_WINDOW_INPUT = 0x0008,

.

        ENABLE_MOUSE_INPUT = 0x0010,

.

    ENABLE_PROCESSED_INPUT = &H1

.

    ENABLE_LINE_INPUT = &H2

.

    ENABLE_ECHO_INPUT = &H4

.

    ENABLE_WINDOW_INPUT = &H8

.

    ENABLE_MOUSE_INPUT = &H10

.

const int STD_INPUT_HANDLE = -10;

.
Summary
.

    /* Writes data directly to the console input buffer. */

.

    [DllImport("kernel32.dll", EntryPoint = "WriteConsoleInputW", CharSet = CharSet.Unicode, SetLastError = true)]

.

    internal static extern bool WriteConsoleInput(

.

        IntPtr hConsoleInput,

.

        INPUT_RECORD[] lpBuffer,

.

    public struct INPUT_RECORD

.

        // https://docs.microsoft.com/en-us/windows/console/input-record-str

.

The only practical usage for this i've found is for debugging code reliant on ReadConsoleInput.

.

    InputHandle = -10,

.

    INPUT_RECORD[] record = new INPUT_RECORD[1];

.

    record[0].EventType = INPUT_RECORD.KEY_EVENT;

.

    bool boi = WriteConsoleInput(GetStdHandle(StdHandle.InputHandle), record, 1, out recordsWritten);

.
Documentation
[WriteConsoleInput] on MSDN

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.

winmm

.
Summary
Connects a MIDI input device to a MIDI thru or output device, or connects a MIDI thru device to a MIDI output device.
.

UInt32 Connect(IntPtr midiInputHandle, IntPtr midiOutputHandle)

.

     return midiConnect(midiInputHandle, midiOutputHandle, IntPtr.Zero);

.
Summary
Disconnects a MIDI input device from a MIDI thru or output device, or disconnects a MIDI thru device from a MIDI output device.
.

UInt32 Disconnect(IntPtr midiInputHandle, IntPtr midiOutputHandle)

.

     return midiDisconnect(midiInputHandle, midiOutputHandle, IntPtr.Zero);

.
Summary
The midiInClose function closes the specified MIDI input device
.
Summary
The midiInGetDevCaps function determines the capabilities of a specified MIDI input device.
.

        public void GetInputDevices()

.

        MessageBox.Show("No MIDI Input Devices Detected");

.
Summary
midiInGetNumDevs - retrieves the number of MIDI input devices in the system
.
Summary
Open a MIDI Port for Input
.
Summary
The midiInReset function stops input on a given MIDI input device
.
Summary
midiInStart - starts MIDI input on the specified MIDI input device
.
Summary
The waveInAddBuffer function sends an input buffer to the given waveform-audio input device.
.
Summary
The waveInClose function closes the given waveform-audio input device.
.
Summary
Gets number of input devices
.
Summary
The waveInReset function stops input on the given waveform-audio input device and resets the current position to zero.
.
Summary
The waveInStart function starts input on the given waveform-audio input device.

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: