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]

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.

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

credui

.

    ''' <param name="ulInAuthBufferSize">Size of the input authentication buffer.</param>

shell32

.

        SEE_MASK_WAITFORINPUTIDLE = 0x02000000,

ws2_32

.

    /// Use to determine the amount of data pending in the network's input buffer that can be read from socket s.

.

        /// Use to determine the amount of data pending in the network's input buffer that can be read from socket s.

.

        /// but is not removed from the input queue.

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,

.

        ENABLE_VIRTUAL_TERMINAL_INPUT = 0x0200,

.

    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_VIRTUAL_TERMINAL_INPUT = 0x0200

.

    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;

.

      Public hStdInput As IntPtr

.

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", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "ReadConsoleInputW")]

.

static extern bool ReadConsoleInput(

.

        IntPtr hConsoleInput,

.

        [Out] INPUT_RECORD[] lpBuffer,

.

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

.

static extern bool ReadConsoleInput(

.

        IntPtr hConsoleInput,

.

        out INPUT_RECORD lpBuffer,

.
  • INPUT_RECORD
.
Documentation
[ReadConsoleInput] on MSDN
.

        public unsafe byte[] CT_ReadFile(int InputReportByteLength)

.

            byte[] BufBytes = new byte[InputReportByteLength];

.

            if (ReadFile(HidHandle, BufBytes, InputReportByteLength, ref BytesRead, null))

.

        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,

.
  • INPUT_RECORD
.

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

msdelta

.

                      DELTA_INPUT GlobalOptions,

.

                      DELTA_INPUT GlobalOptions,

.

DELTA_INPUT

oleacc

.

If you are calling this API from .NET Framework version 2.0 or higher, be sure to put the STAThread attribute on your main(), or manually set the ApartmentState property of the thread you are calling this from to ApartmentStates.STA, or you will get an error code of 0x8001010D which is a “cannot call out exception because of an input synchronous call”.

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

oleaut32

.

        Public Sub New(input As Drawing.Bitmap)

.

            BitmapHandle = input.GetHbitmap()

.

        Public Sub New(input As Drawing.Icon)

.

            IconHandle = input.Handle

.

    Public Function ConvertToIPictureDisplay(input As Bitmap) As stdole.IPictureDisp

.

        Dim bitmap As PICTDESC.Bitmap = New PICTDESC.Bitmap(input)

userenv

.

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

powrprof

.

     IntPtr lpInputBuffer,

.

     UInt32 nInputBufferSize,

.

     IntPtr lpInputBuffer,

.

     uint nInputBufferSize,

.

Private Shared Function CallNtPowerInformation(InformationLevel As Int32, lpInputBuffer As IntPtr, nInputBufferSize As UInt32, lpOutputBuffer As IntPtr, nOutputBufferSize As UInt32) As UInt32

.

        IntPtr lpInputBuffer,

.

        int nInputBufferSize,

.

    private const int PBT_APMRESUMESUSPEND = 7; // (0x7) - Operation is resuming from a low-power state.This message is sent after PBT_APMRESUMEAUTOMATIC if the resume is triggered by user input, such as pressing a key.

.

            Console.WriteLine("\tOperation is resuming from a low-power state.This message is sent after PBT_APMRESUMEAUTOMATIC if the resume is triggered by user input, such as pressing a key.");

.

     [In] SYSTEM_POWER_POLICY[] lpInputBuffer,

.

     int nInputBufferSize,

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>

.

        /// Refreshes the view's contents in response to user input

.

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

misc

42: 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# ?

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.

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.