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]

gdi32

.

    private void timer1_Tick(object sender, EventArgs e)

.

    private void Form_Paint( object p_SenderObject, System.Windows.Forms.PaintEventArgs p_Arguments )

.

private void button1_Click(object sender, EventArgs e)

.

  static private void myControl_MouseMove(object sender,System.Windows.Forms.MouseEventArgs e)

.

    private static extern int SendMessage(IntPtr hWnd, WindowsMessages wMsg, IntPtr wParam, IntPtr lParam);

.

        //This version of SendMessage is a blocking call until all windows respond.

.

        long result = SendMessage(HWND_BROADCAST, WindowsMessages.WM_FONTCHANGE, IntPtr.Zero, IntPtr.Zero);

.

private void button1_Click(object sender, EventArgs e)

.

private void tabControl1_DrawItem(object sender, DrawItemEventArgs e)

.

        private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)

.

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

.

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

.

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

dbghelp

.

  /// <param name="sender"></param>

.

static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)

winmm

.
Summary
The mciSendString function sends a command string to an MCI device. The device that the command is sent to is specified in the command string [This page was changed by iMpostoR]
.

static extern Int32 mciSendString(string command, StringBuilder buffer, int bufferSize, IntPtr hwndCallback);

.

Private Shared Function mciSendString(ByVal command As String, ByVal buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hwndCallback As IntPtr) As Integer

.

Declare Ansi Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal command As String, ByRef buffer As StringBuilder, ByVal bufferSize As Integer, ByVal hWndCallback As IntPtr) As Integer

.

    mciSendString("set CDAudio door open", returnstring,127, IntPtr.Zero);

.

mciSendString(sCommand, null, 0, 0);

.

mciSendString(sCommand, null, 0, _frmObject.Handle.ToInt64());

.

static extern Int32 mciSendString(string command, string buffer, int bufferSize, IntPtr hwndCallback);

.

     mciSendString("set CDAudio door open", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero);

.

     mciSendString("set CDAudio door open", returnstring, 127, IntPtr.Zero)

.

     mciSendString(sCommand, Nothing, 0, IntPtr.Zero)

.

     mciSendString(sCommand, Nothing, 0, Me.Handle.ToInt64())

.
Documentation
[mciSendString] on MSDN
.

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

.

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

.
Summary
The waveInAddBuffer function sends an input buffer to the given waveform-audio input device.

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.

comctl32

.

       private static void imageList_RecreateHandle(object sender, EventArgs e)

.

      if (imageListOverlays.TryGetValue(sender as ImageList, out vals))

.

        NativeMethods.ImageList_SetOverlayImage(((ImageList)sender).Handle, vals[i], i + 1);

.

       private static void imageList_RecreateHandle(object sender, EventArgs e)

.

      if (imageListOverlays.TryGetValue(sender as ImageList, out vals))

.

        NativeMethods.ImageList_SetOverlayImage(((ImageList)sender).Handle, vals[i], i + 1);

Delegates

.

If you’re going to use the lParam to return a by-value result (such as the hwnd of a window you are looking for), you’ll want to send lParam by reference:

ws2_32

.

    // to close the receiving and sending functions of the socket

.

        /// send without using routing tables

.

        /// partial send or recv for message xport

25: recv
.

    public static extern int recvfrom(IntPtr Socket, IntPtr buf, int len, SendDataFlags flags, ref SockAddr from, IntPtr fromlen);

.

    public static int recvfrom(IntPtr Socket, IntPtr buf, int len, SendDataFlags flags, ref SockAddr from)

26: send
.

public static extern int SendTo (IntPtr Socket, IntPtr buff, int len, SendDataFlags flags, ref SockAddr To, int tomlen);

.

    public enum SendDataFlags

.

    /// <summary>Sends OOB data (stream-style socket such as SOCK_STREAM only)</summary>

.

System.Net.Sockets.Socket (class) Socket.SendTo () - better to use It))

.

If no error occurs, sendto returns the total number of bytes sent, which can be less than the number indicated by len. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

27: SendTo
.

[DllImport("ws2_32.dll", EntryPoint="sendto")]

.

public static extern int SendTo (IntPtr Socket, IntPtr buff, int len, SendDataFlags flags, ref SockAddr To, int tomlen);

.

    public enum SendDataFlags

.

    /// <summary>Sends OOB data (stream-style socket such as SOCK_STREAM only)</summary>

.

System.Net.Sockets.Socket (class) Socket.SendTo () - better to use It))

.

If no error occurs, sendto returns the total number of bytes sent, which can be less than the number indicated by len. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

.

        SD_SEND = 1,

.

        SendBuffer = 0x1001,

.

        SendLowWater = 0x1003,

.

        SendTimeout = 0x1005,

.

        /// Offset to checksum for raw IP socket send.

.

        /// permit sending of broadcast msgs

.

        /// send buffer size

.

        /// send low-water mark

.

        /// send timeout

.

        // permit sending of broadcast msgs  

.

        // send buffer size  

.

        // send low-water mark  

.

        // send timeout  

opengl32

.

    public static extern void gluTessEndContour(IntPtr tess);

.

    public static extern void gluTessEndPolygon(IntPtr tess);

wtsapi32

.

$wtsSendMessagesig = @'

.

     public static extern bool WTSSendMessage(

.

$wtsmessage = Add-Type -MemberDefinition $wtsSendMessagesig -name PSWTSSendMessage -Namespace GetLoggedOnUsers -PassThru

.

     $wtsmessage::WTSSendMessage($server, $element.SessionID,$messageTitle,$messageTitle.Length,$message,$message.Length,0,$timeout,[ref]$resp,$true)

.
Summary
The WTSSendMessage function displays a message box on the client desktop of a specified Terminal Services session.
.

static extern bool WTSSendMessage(

.

  Private Shared Function WTSSendMessage(ByVal hServer As IntPtr, ByVal SessionId As Int32, ByVal title As String, ByVal titleLength As UInt32, ByVal message As String, ByVal messageLength As UInt32, ByVal style As UInt32, ByVal timeout As UInt32, ByRef pResponse As UInt32, ByVal bWait As Boolean) As Boolean

.

    public static extern bool WTSSendMessage(

.

$MessageBox = Add-Type memberDefinition $signature -name "WTSAPISendMessage" -namespace WTSAPI passThru

.

    result = WTSSendMessage(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, title, tlen, msg, mlen, 0, 0, out resp, false);

.

    Private Shared Function WTSSendMessage(ByVal hServer As IntPtr, ByVal SessionId As Int32, ByVal title As String, ByVal titleLength As UInt32, ByVal message As String, ByVal messageLength As UInt32, ByVal style As UInt32, ByVal timeout As UInt32, ByRef pResponse As UInt32, ByVal bWait As Boolean) As Boolean

.

    WTSSendMessage(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, title, title.Length, content, content.Length, MessageBoxIcon.Exclamation, Nothing, Nothing, False)

.

Function Send-TSMessageBox

.

    public static extern bool WTSSendMessage(

.

        $MessageBox = Add-Type -memberDefinition $signature -name "WTSAPISendMessage" -namespace WTSAPI -passThru  

.

        $MessageBox::WTSSendMessage(0, $sessionId, $title, $titleLength, $message, $messageLength, $buttonSet, $timeout, [ref] $response, $waitResponse)

.
Documentation
[WTSSendMessage] on MSDN

setupapi

.

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

.

Function SendToUsbPrinter(PrintOut As String) As Boolean

.

SendToUsbPrinter = False

.

SendToUsbPrinter = True

powrprof

.

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

.

force: true to force the suspended mode immediately; false to cause Windows to send a suspend request to every application.

dhcpsapi

.

            PingReply result = ping1.Send(rowReader["IP_address"].ToString(), 1000);

shlwapi

.

    Private Sub pathFromUrlButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pathFromUrlButton.Click

.

    Private Sub urlFromPathButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles urlFromPathButton.Click

iphlpapi

.

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

.

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

.
Summary
Send ARP message to a Network Card in the LAN
.

  public static extern int SendARP(

.

  Declare Function SendARP Lib "iphlpapi.dll" (

.

SendARP returns 0 on success. The parameter SrcIP can be 0.

.

    SendARP(CType(addr.Address, UInt32), 0, mac, len)

.

int retValue = SendARP(uintAddress, 0, macAddr, ref macAddrLen);

.

    throw new Win32Exception(retValue, "SendARP failed.");

.
Documentation
[SendARP] on MSDN
.

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

coredll

.

    private void GoodStuff(object sender, EventArgs e)

.
Summary
This function allows you to send and receive data to control certain devices of your CE device.
.

a godsend for backwards portability

.

    public const int SWP_NOSENDCHANGING = 0x0400;

.

    Public Const SWP_NOSENDCHANGING As Integer = &H400

.

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

.

private void SendToBack()

.

Use String.Format() to create the string before sending it to the native API to avoid the multiple vars version of the native function.

.

static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

Declare Function SendInput Lib "coredll.dll" (TODO) As TODO

.

        public static extern uint SendInput(uint cInputs, /* [MarshalAs(UnmanagedType.LPArray)] */ KEYBOARDINPUT[] inputs, int cbSize);

.

        retVal = cTabControl.SendInput(2, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        retVal = cTabControl.SendInput(4, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        retVal = cTabControl.SendInput(4, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.

        retVal = cTabControl.SendInput(6, inputs, 0x001C);

.

        throw new Exception(string.Format("SendInput() returned {0}.", error));

.
Documentation
[SendInput] on MSDN
.

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

.

Declare Function SendMessage Lib "coredll.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As IntPtr

.

If you are searching for a way to send keys to an application, you can use System.Windows.Forms.SendKeys.Send(keys) after bringing the window to the top via the SetForegroundWindow API.

.

    private void button1_Click(object sender, EventArgs e)

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYDOWN, (int)User32.VK.VK_DOWN, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYUP, (int)User32.VK.VK_DOWN, 0);

.

    private void button2_Click(object sender, EventArgs e)

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYDOWN, (int)User32.VK.VK_UP, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYUP, (int)User32.VK.VK_UP, 0);

.

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

.

    private void button2_Click(object sender, EventArgs e)

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYDOWN, (int)User32.VK.VK_UP, 0);

.

    User32.SendMessage(listView1.Handle, User32.WM.WM_KEYUP, (int)User32.VK.VK_UP, 0);

.

    private void Form1_Load(object sender, EventArgs e)

.

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

.
Documentation
.

private void SendToBack ()

.

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

.

        SendMessage(Handle, EM_LINESCROLL, 0, Row);

.

    private void btnGet_Click(object sender, EventArgs e)

.

    private void btnSet_Click(object sender, EventArgs e)

.

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

.

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

.

    public const int SWP_NOSENDCHANGING = 0x0400;

.

    Public Const SWP_NOSENDCHANGING As Integer = &H400

.

        /// <summary>Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to

.

        /// <remarks>SWP_NOSENDCHANGING</remarks>

.

        DoNotSendChangingEvent = 0x0400,

.

    void SendWPFWindowToBack(Window window)

.
Summary
This function sends a message to the system to add, modify, or delete an application-specific icon from the taskbar status area. It does not affect icons appearing on the home screen.
.

private void button1_Click(object sender, EventArgs e)

.

private void menuItem1_Click(object sender, EventArgs e)

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


 
Access PInvoke.net directly from VS: