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]

kernel32

.

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

.

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

.

private void shutdownToolStripMenuItem_Click(object sender, EventArgs e)

.

     DiskSmartSendDriveCommand = (EFileDevice.Disk << 16) | (0x0021 << 2) | EMethod.Buffered | (FileAccess.ReadWrite << 14),

.

   Private Const DFP_SEND_DRIVE_COMMAND As Integer = &H7C084

.

   Private Declare Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Integer, ByVal dwIoControlCode As Integer, ByRef lpInBuffer As SENDCMDINPARAMS, ByVal nInBufferSize As Integer, ByRef lpOutBuffer As IntPtr, ByVal nOutBufferSize As Integer, ByRef lpBytesReturned As Integer, ByVal lpOverlapped As IntPtr) As Integer

.

   Structure SENDCMDINPARAMS

.

       Dim bDriveNumber As Byte    ' Physical drive number to send command to (0,1,2,3).

.

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

.

       Dim SCIP As SENDCMDINPARAMS

.

    CLRRTS = 4, //Clears the RTS (request-to-send) signal.

.

    SETDTR = 5, //Sends the DTR (data-terminal-ready) signal.

.

    SETRTS = 3, //Sends the RTS (request-to-send) signal.

.

    // watching for CTS (Clear To Send)

.

    void watchdog_Tick(object sender, EventArgs e)

.

    private void cmdTest_Click(object sender, EventArgs e)

.

    protected void Page_Load(pbject sender, EventArgs e)

.

    public byte   ncb_sto;        /* send timeout/sys timeout       */

.

Sends a string to the debugger for display.

.

If you need a more accurate break time, you could lower the baud rate, send

.

There is a message (WM_SETTINGCHANGE) you can send in order to notify the active windows that there has been a configuration change using the SendMessageTimeout function.

.

Sending NULL to lpData and 0 to cbData will delete the file indicated by hUpdate.

.

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

dwmapi

.

A more reliable approach to set the colorization parameters would be to implement your own method that tries to set each parameter directly in the Windows registry and sends the WM_DWMCOLORIZATIONCOLORCHANGED message to notify all top-level windows about the change, with proper exception handling in the case a value cannot be set. The colorization parameters can be found under the key "HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM". Please note that these are also undocumented and as such can also be changed or removed in the future.

.

    public void SetParameters(object sender, EventArgs e)

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:

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)

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.

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

winspool

.

Optionally call SendMessageTimeout() to notify running programs of the change:

.

    pinvokeResult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero,

.

        IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000, out innerPinvokeResult);

.

        pinvokeResult = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero,

.

            IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000, out innerPinvokeResult);

.

    // SendBytesToPrinter()

.

    // of bytes, the function sends those bytes to the print queue.

.

    public static bool SendBytesToPrinter( string szPrinterName, IntPtr pBytes, Int32 dwCount)

setupapi

.

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

.

Function SendToUsbPrinter(PrintOut As String) As Boolean

.

SendToUsbPrinter = False

.

SendToUsbPrinter = True

netapi32

.
Summary
This function sends a buffer of information to a registered message alias.
.

static extern int NetMessageBufferSend(

.

    ''' The NetMessageBufferSend function sends a buffer of information to a registered message alias.

.

    ''' Windows NT:  No special group membership is required to execute the NetMessageBufferSend function on a LAN Manager or a Windows NT system.

.

    ''' Admin, Accounts, Print, or Server Operator group membership is required to successfully execute NetMessageBufferSend on a remote server.

.

    Public Declare Function NetMessageBufferSend Lib "netapi32.dll" _

.

The Alerter service must be running for NetMessageBufferSend to function.

.

This is a simple console program which lets you send messages (quite similar to the NET SEND command...).

.
Usage
sendnetmsg.exe srcName dstName message
.

public class SendNetMsg

.

    public static extern int NetMessageBufferSend(

.

        Console.WriteLine ("sendnetmsg.exe srcName dstName msg");

.

        int retVal = NetMessageBufferSend (null, argv[1], argv[0], argv[2], argv[2].Length * 2);    

.
Documentation
[NetMessageBufferSend] on MSDN
.

        private static extern int NetMessageBufferSend(

.

        public static int NetMessageSend(string serverName,string messageName,string fromName,string strMsgBuffer, int iMsgBufferLen)

.

            return NetMessageBufferSend(serverName,messageName,fromName,strMsgBuffer,iMsgBufferLen*2);

.

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

.

            ' Note: By Sending Null were looking at current machine

odbc32

.

    Private Sub OnGetODBCConnectionNames(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbExpSID.DropDown, cmbImpSid.DropDown

.

    Dim c As ComboBox = sender

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.

faultrep

.
Summary
Trigger sending a crash report to Microsoft

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

winscard

.
Summary
The SCardTransmit function sends a service request to the smart card and expects to receive data back from the card.
.

     ref SCARD_IO_REQUEST pioSendRequest,

.

     ref byte SendBuff,

.

     UInt32 SendBuffLen,

.

        byte[] sendBytes = new byte[] { 0xFF, 0xCA, 0x00, 0x00, 0x00 }; //get UID command for iClass cards

.

        int status = SCardTransmit(_hCard, ref request, ref sendBytes[0], (uint)sendBytes.Length, ref request, out receivedUID[0], ref outBytes);

.

byte[] pbSendBuffer = { 0xC0, 0xA4, 0x00, 0x00, 0x02, 0x3F, 0x00 }; // Example Cla,Ins,P1,P2,P3,DataIN (Select MF)

.

int cbSendLength=pbSendBuffer.Length;

.

uint errors=SCardTransmit(nCard, SCARD_PCI_T0, pbSendBuffer, cbSendLength, ioRecv, pbRecvBuffer, ref pcbRecvLength);

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.

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


 
Access PInvoke.net directly from VS: