Desktop Functions: Smart Device Functions:
|
Search Results for "send" in [All]kernel321: AllocConsole
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) 8: lstrcat
protected void Page_Load(pbject sender, EventArgs e) 9: NetBIOS
public byte ncb_sto; /* send timeout/sys timeout */ Sends a string to the debugger for display. 11: SetCommBreak
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. 13: UpdateResource Sending NULL to lpData and 0 to cbData will delete the file indicated by hUpdate. 14: ZeroMemory
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click dwmapiA 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) Delegates16: EnumWindowsProc 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) 18: DeviceIOControl 19: DisableGestures a godsend for backwards portability 20: FindWindowW
public const int SWP_NOSENDCHANGING = 0x0400;
Public Const SWP_NOSENDCHANGING As Integer = &H400 21: GetCapture private void Form_Load(object sender, System.EventArgs e) 22: GetDesktopWindow
private void SendToBack() 23: NKDbgPrintfW Use String.Format() to create the string before sending it to the native API to avoid the multiple vars version of the native function. 24: SendInput
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)); 25: SendMessage
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);
private void SendToBack () 27: SetScrollPos
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) 29: SetSystemTime
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) 30: SetWindowPos
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) 31: Shell_NotifyIcon 32: SignalStarted private void button1_Click(object sender, EventArgs e) 33: TerminateProcess
private void menuItem1_Click(object sender, EventArgs e) powrprof34: SetSuspendState
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. comctl3235: ImageList_DrawEx
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); winspoolOptionally 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); 38: WritePrinter
// SendBytesToPrinter()
// of bytes, the function sends those bytes to the print queue.
public static bool SendBytesToPrinter( string szPrinterName, IntPtr pBytes, Int32 dwCount) setupapi39: Option Explicit Text1.Text = SendToUsbPrinter(”Hello world.”) Function SendToUsbPrinter(PrintOut As String) As Boolean SendToUsbPrinter = False SendToUsbPrinter = True netapi32
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...).
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); 41: netserverenum
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); 42: NetShareEnum
private void button1_Click(object sender, System.EventArgs e) 43: NetShareGetInfo
' Note: By Sending Null were looking at current machine odbc3244: SQLDataSources
Private Sub OnGetODBCConnectionNames(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbExpSID.DropDown, cmbImpSid.DropDown
Dim c As ComboBox = sender winmm45: mciSendString
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()) 46: PlaySound
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 47: waveInAddBuffer faultrep48: ReportFault mapi32
/// 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 (....); 50: MAPISendMail
/// 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); winscard51: SCardTransmit
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); user32An 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. 54: CreateCaret
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 56: DestroyWindow
/// <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) 57: EnableMenuItem
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 58: EndTask
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. |