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

wininet

.
Summary
Sends commands directly to an FTP server.
.

lpszCommand (in) A pointer to a string that contains the command to send to the FTP server.

.

Sends the specified request to the HTTP server, allowing callers to send extra data beyond what is normally passed to HttpSendRequestEx.

.

extern public static bool HttpSendRequest(

.
Documentation
[HttpSendRequest] on MSDN
.

For FTP connections, if lpszUsername is NULL, InternetConnect sends the string "anonymous" as the user name. If lpszPassword is NULL, InternetConnect attempts to use the user's e-mail name as the password.

.

    Private Sub cmdGetPolicy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGetPolicy.Click

.

    Private Sub cmdSetPolicy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSetPolicy.Click

setupapi

.

Text1.Text = SendToUsbPrinter(”Hello world.”)

.

Function SendToUsbPrinter(PrintOut As String) As Boolean

.

SendToUsbPrinter = False

.

SendToUsbPrinter = True

advapi32

.

    void serviceInstaller1_Committed(object sender, InstallEventArgs e)

.

    void serviceInstaller1_Committed(object sender, InstallEventArgs e)

.
Summary
The ControlService function sends a control code to a service.
.

    public delegate void RegistryChangeHandler(object sender, RegistryChangeEventArgs e);

.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

.
Summary
Used in ETW tracing to send and event to log.

mapi32

.
Summary
MAPISendDocuments - Sends a standard message with one or more attached files and a cover note.
.

  /// The MAPISendDocuments function sends a standard message with one or more attached files and a cover note.

.

  /// message. MAPISendDocuments differs from the MAPISendMail function in that it allows

.

  public static extern uint MAPISendDocuments(IntPtr ulUIParam, string lpszDelimChar, string lpszFullPaths,

.

MAPISendDocuments (....);

.
Documentation
[MAPISendDocuments] on MSDN
.
Summary
MAPISendMail - Sends a message.
.

  /// The MAPISendMail function sends a message.

.

  /// This function differs from the MAPISendDocuments function in that it allows greater

.

  public static extern uint MAPISendMail(IntPtr lhSession, IntPtr ulUIParam,

.

    Private Shared Function MAPISendMail(ByVal sess As IntPtr, ByVal hwnd As IntPtr, ByVal message As MapiMessage,

.

    static extern int MAPISendMail(IntPtr sess, IntPtr hwnd, MapiMessage message, int flg, int rsv);

.

    public int SendMail(string fileName)

.

        int result = MAPISendMail(new IntPtr(0), new IntPtr(0), msg, 0x00000001 | 0x00000008, 0);

.
Documentation
[MAPISendMail] on MSDN

icmp

.

B¼Ö^¤mÄÉñây°¼¬¬ÆðÇ풄ßM/ԅyrÑñGƒ;;8ó0œŠfMûޏ¯EÍ|#Í ×'êLkßH·ÖåГî_senD,ás ‘R¤7B¡‡Xü[B]8©:1”O?¹ÏɱÐFxVBiËü’ð¯¥ìIÜË8@쮉ås،<‘£a]uê«#ë¦Oî`&V±ˆ±«&±ÈYAø€9qµ:›<Ñ ]CŽÙ¨ü#;‡›ñ)Þ¦äõŜ;{ÕshʼnÚc‰Ö »ƒüÇîËá•Vsõ#ÊlÁé=¬{¸–z>{¨ê0NOCÑ6 ñ›ýf0¿¾7&þ&}=)R%í¤xÿvûÔíØ HhÈó½6 ÕUúø3ÀÖ( ùÈޙTæóMÈÝ5èlü0¿£Ä>¬2JÁíïÚ±ïl¨˜ÝøäjäÃ@Ñh.Ó_é&ýøJgOE)ú‘éZÍШ¬‹)«¦½•¨<ó;(4Aò-rWQ F1ñÓ™ÛÆïúÎá|8žkê•SW5U+#¸ÿE­'¬´‘j]X…s®Êœd2'¶Lg^M+(>%ÞÛícLÁ=4­J`ØAÀ`­GJ

.
Summary
Sends an ICMP Echo Request and returns any replies. The call returns when the time-out has expired or the reply buffer is filled.
.

static extern Int32 IcmpSendEcho(IntPtr icmpHandle, Int32 destinationAddress, IntPtr requestData, Int16 requestSize, IntPtr requestOptions, IntPtr replyBuffer, Int32 replySize, Int32 timeout);

.

Declare Function IcmpSendEcho Lib "icmp.dll" (icmpHandle as IntPtr, destinationAddress as Int32, requestData as IntPtr, requestSize as Int16, requestOptions as IntPtr, replyBuffer as IntPtr, replySize as Int32, timeout as Int32) As Int32

.

        private static extern int IcmpSendEcho(IntPtr icmpHandle, int destinationAddress, string requestData, short requestSize, ref ICMP_OPTIONS requestOptions, ref ICMP_ECHO_REPLY replyBuffer, int replySize, int timeout);

.

            int iReplies = IcmpSendEcho(icmpHandle, BitConverter.ToInt32(ip.GetAddressBytes(), 0), sData, (short)sData.Length, ref icmpOptions, ref icmpReply, Marshal.SizeOf(icmpReply), 30);

.

DWORD WINAPI IcmpSendEcho(HANDLE IcmpHandle, IPAddr DestinationAddress,

.

    char SendData[32] = "Data Buffer";

.

    ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData);

.

    dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData),

.
Documentation
[IcmpSendEcho] on MSDN

user32

.

An application sends the WM_MDIICONARRANGE message to the multiple-document interface (MDI) client window to prompt the client window to arrange its minimized MDI child windows.

.
Summary
.

    private void button1_Click(object sender, System.EventArgs e) {

.

    Private Sub TextBox1_GotFocus(sender As Object, e As EventArgs) Handles TextBox1.GotFocus

.

    ///<Summary>Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.</Summary>

.

    SWP_NOSENDCHANGING = 0x0400,

.

    '''<Summary>Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed.</Summary>

.

    SWP_NOSENDCHANGING = &H0400

.

    SWP_NOSENDCHANGING As Integer = &H0400

.

/// <para>The DestroyWindow function destroys the specified window. The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).</para>

.

''' <para>The DestroyWindow function destroys the specified window. The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it. The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership, and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).</para>

.

btnCloseWindow_Click(object sender, EventArgs e)

.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

.

     private void label1_Click(object sender, EventArgs e)

.

    Private Sub label1_Click(sender As Object, e As EventArgs)

.

     private void button1_Click(object sender, EventArgs e)

.

     private void button2_Click(object sender, EventArgs e)

.

            // Try closing application by sending WM_CLOSE to all child windows in all threads.

.

       ' Try closing application by sending WM_CLOSE to all child windows in all threads.

.

    private void timer1_Tick(object sender, EventArgs e)

.

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

.

Private Sub Button1_Click(ByVal sender As System.Object, _

.

     private void button1_Click(object sender, EventArgs e)

.

     private void button2_Click(object sender, EventArgs e)

.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

.

Sendmessage(hwndMain, WM_COMMAND, intMID,  0) 'Click the MenuItem!

.

        QS_SENDMESSAGE =    0x0040,

.

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

.

Sendmessage(hwndMain, WM_COMMAND, intMID,  0) 'Click the MenuItem!

.

     private void Form1_Load(object sender,EventArgs e)

.

    private void Form1_Load(object sender, EventArgs e)

.

    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click

.

private void button1_Click(object sender, System.EventArgs e)

.

Private Sub tb_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles tb.GotFocus

.
Summary
.

static extern InSendMessageExFlags InSendMessageEx(IntPtr lpReserved);

.

InSendMessageExFlags

.
Documentation
[InSendMessageEx] on MSDN
.

    private void button1_Click(object sender, EventArgs e)

.

// Sends ENTER button press event in focused window

.

     private void timer1_Tick(System.Object sender, System.EventArgs e)

.

' Sends ENTER button press event in focused window

.

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

.

Alternative Managed API: System.Windows.Forms.SendKeys

.

    private void Compare(object sender, string expected, string actual)

.

        Button ClickedButton = (Button)sender;

.

    private void buttonNumericAccept_Click(object sender, EventArgs e)

.

        // Send Appropriate Key Presses

.

        Compare(sender, expected, NumericTextbox.Text);        

.

    private void Surface_MouseEnter(object sender, EventArgs e)

.

    Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed

.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

.

    private void Surface_MouseEnter(object sender, EventArgs e)

.

    Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed

.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

.

private void button1_Click(object sender, EventArgs e)

.

FYI, Microsoft tells us for "Windows NT/2000/XP: This function has been superseded. Use SendInput instead."

.

     private void timer1_Tick(System.Object sender, System.EventArgs e)

.

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

.

    Private Sub cmdClick_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdClick.Click

.

    Private Sub picClicker_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles picClicker.Click

.

    Private Sub picClicker_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picClicker.MouseDown

.

    Private Sub picClicker_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picClicker.MouseUp

.

Thus I have resigned myself to unmanaged code for now. I will post the SendInput version shortly as mouse_event has been deprecated by Bill in favor of SendInput.

.

    Private Sub ResizeMe_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ResizeMe.MouseMove

.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

.

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

.

private void Paint(object sender, PaintEventArgs e)

.

MSDN recommends using PostQuitMessage over PostMessage when you want to send WM_QUIT http://msdn.microsoft.com/en-us/library/ms632641%28v=vs.85%29.aspx

.
Summary
Registers a device to send its raw input data.
.

///     when sending or posting messages.

.

///     <see cref="RegisterWindowMessage" /> when more than one application must process the same message.For sending

.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

.

    Private Shared Function SendMessage(ByVal hWnd As IntPtr,

.

    Private Sub Form1_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown

.

        SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0)

.

private static extern int SendMessage(IntPtr hWnd, int msg , int wParam , ref int lParam);

.

private void control_MouseDown(object sender, MouseEventArgs e)

.

   Control ctrl = sender as Control;

.

   SendMessage(ctrl.Handle, WM_SYSCOMMAND, MOUSE_MOVE, ref nul);

.

  private static extern UInt32 SendMessage(

.

  lResult = SendMessage(  // returns LRESULT in lResult

.

    private static extern uint SendMessage(

.

    private static extern uint SendMessage(

.

        return (int)SendMessage(this._handle, SB_GETPARTS, 0, 0);

.

        uint length = (uint)SendMessage(this._handle, SB_GETTEXTLENGTH, index, 0);

.

            StatusBar.SendMessage(this._handle, SB_GETTEXT, (IntPtr)index, allocated);

.

/// If SW_INVALIDATE, don't send WM_ERASEBACKGROUND.

.

unsafe private void hScrollBar1_Scroll( object sender, ScrollEventArgs e )

.
Summary
.

static extern IntPtr SendDlgItemMessage(IntPtr hDlg, int nIDDlgItem, uint Msg,

.

Private Shared Function SendDlgItemMessage(ByVal hDlg As IntPtr, _

.

Private Declare Function SendDlgItemMessage Lib "user32" (ByVal hDlg As IntPtr, _

.

        SendDlgItemMessage(theDialogBoxHandle, theNoButtonItemId, theClickMessage, wParam, lParam)

.
Documentation
[SendDlgItemMessage] on MSDN
.
Summary
.

The SendInput function synthesizes keystrokes, mouse motions, and button clicks to the currently active window

.

   internal static extern uint SendInput (uint nInputs,

.

Friend Shared Function SendInput(<[In]()> ByVal nInput As UInt32,

.

Private Declare Function SendInput Lib "user32.dll" (ByVal cInputs As Integer, ByRef pInputs As INPUT, ByVal cbSize As Integer) As Integer

.

   Api.user32.SendInput((uint)pInputs.Length, pInputs, StructLib.INPUT.Size);

.

   Start-Sleep 2 ; [Testing.Windows3]::SendInput($_inputArray.count, $_inputArray, [Runtime.InteropServices.marshal]::SizeOf($_inputArray[0]))

.
Documentation
[SendInput] on MSDN
.
Summary
.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags fuFlags,

.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", SetLastError=true, CharSet=CharSet.Auto)]

.

public static extern uint SendMessageTimeoutText(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", CharSet = CharSet.Auto)]

.

public static extern int SendMessageTimeout(

.

SendMessageTimeoutFlags

.

Public Sub SendMessageTimeout(ByVal windowHandle As IntPtr,ByVal Msg As Integer,ByVal wParam As IntPtr,ByVal lParam As IntPtr,ByVal flags As SendMessageTimeoutFlags,ByVal timeout As Integer,ByRef result As IntPtr)

.

Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As SendMessageTimeoutFlags, ByVal timeout As Integer, ByRef result As IntPtr) As IntPtr

.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

.

    int result = SendMessageTimeout(hwnd, WM_GETTEXTLENGTH, 0, 0, 0X2C, 5, out length); //0X2C = SMTO_ABORTIFHUNG | SMTO_BLOCK | SMTO_NOTIMEOUTIFNOTHUNG | SMTO_ERRORONEXIT

.
Documentation
[SendMessageTimeout] on MSDN
.
Summary
.

static extern bool SendMessageCallback(IntPtr hWnd, uint Msg, UIntPtr wParam,

.

    IntPtr lParam, SendMessageDelegate lpCallBack, UIntPtr dwData);

.

C# signature for the SendMessageDelegate:

.

delegate void SendMessageDelegate(IntPtr hWnd, uint uMsg, UIntPtr dwData, IntPtr lResult);

.
Documentation
[SendMessageCallback] on MSDN
.
Summary
.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags fuFlags,

.

public static extern IntPtr SendMessageTimeout(

.

    SendMessageTimeoutFlags flags,

.

[DllImport("user32.dll", EntryPoint = "SendMessageTimeout", SetLastError=true, CharSet=CharSet.Auto)]

.

public static extern uint SendMessageTimeoutText(

.

    SendMessageTimeoutFlags flags,

.

SendMessageTimeoutFlags

.

Public Sub SendMessageTimeout(ByVal windowHandle As IntPtr,ByVal Msg As Integer,ByVal wParam As IntPtr,ByVal lParam As IntPtr,ByVal flags As SendMessageTimeoutFlags,ByVal timeout As Integer,ByRef result As IntPtr)

.

Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As SendMessageTimeoutFlags, ByVal timeout As Integer, ByRef result As IntPtr) As IntPtr

.

Win32.SendMessageTimeout(windowHandle, lMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORT_IF_HUNG, 1000, out lRes);

.
Documentation
[SendMessageTimeout] on MSDN
.
Summary
.

static extern bool SendNotifyMessage(IntPtr hWnd, uint Msg, UIntPtr wParam,

.

Public Function SendNotifyMessage( _

.

Public Declare Function SendNotifyMessage Lib "user32.dll" Alias "SendMessageA" ( _

.
Documentation
[SendNotifyMessage] on MSDN
.

    static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);

.

            SendMessage(hWndNextWindow, m.Msg, m.WParam, m.LParam);

.

            SendMessage(hWndNextWindow, m.Msg, m.WParam, m.LParam);

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


 
Access PInvoke.net directly from VS: