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]

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,

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

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>

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

cards

.
Summary
Draws a card in with size dx, dy at position x, y on the input device context.
.
Summary
Draws a card in with size dx, dy at position x, y on the input device context.

rapi

.

   uint cbInput,

.

   IntPtr pInput,

.

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

.

    LocalFree( pInput );

msvcrt

35: 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)

36: scanf
.
Summary
Read formatted data from standard input

advapi32

37: AddAce
.

    /// <param name="nAceListLength">Specifies the size, in bytes, of the input buffer

.

      SE_UNSOLICITED_INPUT_NAME,

.

    Public stdInput As IntPtr

.

            public IntPtr stdInput;

.
Summary
The LookupAccountName function accepts the name of a system and an account as input. It retrieves a security identifier (SID) for the account and the name of the domain on which the account was found.
.
Summary
The LookupAccountSid function accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain on which this SID is found.
.

    'Input format is the format returned from "ConvertStringSidToSid"

.

    ' Setup the input parameters for the LsaRemoveAccountRights API

.

    ' Setup the input parameters for the LsaEnumerateAccountsWithUserRight API

.

    ' Setup the input parameters for the LsaEnumerateAccountsWithUserRight API

.

    ' Setup the input parameters for the LsaRemoveAccountRights API

.

After calling the MapGenericMask function, the access mask pointed to by the AccessMask parameter has none of its generic bits (GenericRead, GenericWrite, GenericExecute, or GenericAll) or undefined bits set, although it can have other bits set. If bits other than the generic bits are provided on input, this function does not clear them.

.

    IntPtr InputArg,

.

internal struct NET_VALIDATE_AUTHENTICATION_INPUT_ARG

.

    public NET_VALIDATE_PERSISTED_FIELDS InputPersistedFields;

.

internal struct NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG

.

    public NET_VALIDATE_PERSISTED_FIELDS InputPersistedFields;

.

internal struct NET_VALIDATE_PASSWORD_RESET_INPUT_ARG

.

    public NET_VALIDATE_PERSISTED_FIELDS InputPersistedFields;

.

     var inputArgs = new NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG();

.

     inputArgs.PasswordMatched = true;

.

     inputArgs.UserAccountName = @"accountname";

.

     IntPtr inputPointer = IntPtr.Zero;

.

        inputArgs.ClearPassword = Marshal.StringToBSTR(@"password");

.

        //inputArgs.ClearPassword = Marshal.SecureStringToBSTR(secureStringPassword);

.

        inputPointer = Marshal.AllocHGlobal(Marshal.SizeOf(inputArgs));

.

        Marshal.StructureToPtr(inputArgs, inputPointer, false);        

.

        NET_API_STATUS status = NetValidatePasswordPolicy(serverName, IntPtr.Zero, NET_VALIDATE_PASSWORD_TYPE.NetValidatePasswordChange, inputPointer, ref outputPointer);

.

        if (inputArgs.ClearPassword != IntPtr.Zero)

.

            Marshal.ZeroFreeBSTR(inputArgs.ClearPassword);

.

        if (inputPointer != IntPtr.Zero)

.

            Marshal.FreeHGlobal(inputPointer);

.

            SeUnsolicitedInputPrivilege,

urlmon

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

ntdll

.

SeUnsolicitedInputPrivilege = 5

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.

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


 
Access PInvoke.net directly from VS: