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 "INPUT" in [All]

urlmon

.
  • Use Marshal.StringToCoTaskMemUni() to prepare input parameters (IntPtr) declared to receive strings.

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

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>

winspool

.

static extern int DocumentProperties(IntPtr hwnd, IntPtr hPrinter, [MarshalAs(UnmanagedType.LPWStr)] string pDeviceName, IntPtr pDevModeOutput, IntPtr pDevModeInput, int fMode);

.

static extern int DocumentProperties(IntPtr hWnd, IntPtr hPrinter, string pDeviceName, IntPtr pDevModeOutput, IntPtr pDevModeInput, fModes fMode);

.

    Private Shared Function DocumentProperties(ByVal hwnd As IntPtr, ByVal hPrinter As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal pDeviceName As String, ByVal pDevModeOutput As IntPtr, ByVal pDevModeInput As IntPtr, ByVal fMode As Integer) As Integer

.

Doesn't work on a x64 system. (i.e. this declaration is wrong for x64, I'm just not quite sure why.). MH:I tested the code extensivly and I think the param "IntPtr pDevModeInput" must not have the "ref" flag. If it has the initial state of the dialog is wrong. EP: Yup, you're right! Thanks!!! I've been trying to figure out why it doesn't work on some drivers for a few weeks now! "ref" removed.

.

static extern bool XcvData(IntPtr hXcv, [MarshalAs(UnmanagedType.LPWStr)] string pszDataName, IntPtr InputData, uint cbInputData,

setupapi

.

inputDeviceInstance, Caller-supplied device instance handle that is bound to the local machine.

.

inputDeviceInstance, Caller-supplied device instance handle that is bound to the local machine

.

    //Inputs:   pointer to hdev, SP_DEV_INFO, bool

.

    MidiDevName  = "inputwave"

.

    //Inputs:   pointer to hdev, SP_DEV_INFO, bool

hid

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

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

.

      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.

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

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

ntdll

.

    ProcessImageFileMapping, // q: HANDLE (input)

misc

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

rapi

.

   uint cbInput,

.

   IntPtr pInput,

.

INT MyFunction( DWORD cbInput, BYTE pInput, DWORD pcbOutput, BYTE *ppOutput, IRAPIStream *pStream, PVOID reserved )

.

    LocalFree( pInput );

odbc32

.

extern static short SQLAllocHandle(ushort HandleType, int InputHandle, out IntPtr OutputHandle);

.

Private Declare Auto Function SQLAllocHandle Lib "odbc32.dll" (ByVal HandleType As Short, ByVal InputHandle As IntPtr, ByRef OutputHandle As IntPtr) As Short

.

    private static extern short SQLAllocHandle(short hType, IntPtr inputHandle, out IntPtr outputHandle);

.

/// <param name="EnvironmentHandle">[Input] Environment handle.</param>

.

/// <param name="Direction">[Input] Determines which data source the Driver Manager returns information on.</param>

.

/// <param name="BufferLength1">[Input] Length of the *ServerName buffer, in characters; this does not need to be longer than SQL_MAX_DSN_LENGTH plus the null-termination character.</param>

.

/// <param name="BufferLength2">[Input] Length in characters of the *Description buffer.</param>

.

static extern short SQLFreeHandle(ushort HandleType, IntPtr InputHandle);

.

Declare Function SQLFreeHandle Lib "odbc32.dll" (ByVal HandleType As Short, ByVal InputHandle As IntPtr) As Short

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

.

       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 = &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

.
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,

.

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

.
Documentation
[WriteConsoleInput] on MSDN

msvcrt

56: kbhit
.
Summary
Checks the console for keyboard input.
.

System.Console.KeyAvailable() - Gets a value indicating whether a key press is available in the input stream. (Nonblocking)

57: scanf
.
Summary
Read formatted data from standard input

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,

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


 
Access PInvoke.net directly from VS: