Desktop Functions: Smart Device Functions:
|
Search Results for "Command" in [All]user32
void IContextMenu.GetCommandString(int idCmd, uint uFlags, int pwReserved, StringBuilder commandString, int cchMax)
commandString = new StringBuilder("...");
commandString = new StringBuilder("...");
void IContextMenu.InvokeCommand (IntPtr pici)
Type typINVOKECOMMANDINFO = Type.GetType("ShellExt.INVOKECOMMANDINFO");
INVOKECOMMANDINFO ici = (INVOKECOMMANDINFO)Marshal.PtrToStructure(pici, typINVOKECOMMANDINFO);
Win32.ShowWindow(hwnd, ShowWindowCommands.Normal );
enum DeferWindowPosCommands :uint {
Public Enum DeferWindowPosCommands As UInteger
Public Enum DeferWindowPosCommands 5: DeleteMenu
internal const UInt32 MF_BYCOMMAND =0x00000000;
internal const UInt32 MF_BYCOMMAND =0x00000000;
Main(System.Environment.GetCommandLineArgs()) Compile at bash command line with: gcc -Wall idle.c 9: GetMenu internal const UInt32 MF_BYCOMMAND =0x00000000; MF_BYCOMMAND Indicates that uIDItem gives the identifier of the menu item. If neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified, the MF_BYCOMMAND flag is the default flag. 10: GetMenuItemID
Sendmessage(hwndMain, WM_COMMAND, intMID, 0) 'Click the MenuItem! 11: GetMenuString internal const UInt32 MF_BYCOMMAND =0x00000000; MF_BYCOMMAND Indicates that uIDItem gives the identifier of the menu item. If neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified, the MF_BYCOMMAND flag is the default flag. 12: GetRawInputData
/// <param name="uiCommand">Command to issue when retrieving data.</param>
public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, out RAWINPUT pData, ref int pcbSize, int cbSizeHeader);
/// <param name="uiCommand">Command to issue when retrieving data.</param>
public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, byte[] pData, ref int pcbSize, int cbSizeHeader);
outSize = Win32API.GetRawInputData(m.LParam, RawInputCommand.Input, out input, ref size, Marshal.SizeOf(typeof(RAWINPUTHEADER)));
public static extern uint GetRawInputDeviceInfo(int deviceHandle, uint command, ref DeviceInfo data, ref uint dataSize);
static extern uint GetRawInputDeviceInfo(IntPtr hDevice, uint uiCommand, IntPtr pData, ref uint pcbSize);
Declare Function GetRawInputDeviceInfo Lib "user32.dll" Alias "GetRawInputDeviceInfoW" (ByVal hDevice As IntPtr, ByVal uiCommand As DeviceInfoTypes, ByVal pData As IntPtr, ByRef pcbSize As UInteger) As Integer 15: GetSubMenu
Sendmessage(hwndMain, WM_COMMAND, intMID, 0) 'Click the MenuItem! 16: MB_GetString 17: mouse_event This code assumes a form called frmMain with a command button called cmdClick a picture box called picClicker and a text box called txtResults Note Twips are no more. Also, I stripped the FOR loop of delta moves from the command button click to the middle of the picture box. 18: ReleaseCapture
private const int WM_SYSCOMMAND = 0x112;
SendMessage(ctrl.Handle, WM_SYSCOMMAND, MOUSE_MOVE, ref nul); 19: SetParent
const int WM_SYSCOMMAND = 274;
SendMessage(proc.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0); 20: ShowWindow
Public Shared Function ShowWindowAsync(hWnd As IntPtr, <MarshalAs(UnmanagedType.I4)>nCmdShow As ShowWindowCommands) As <MarshalAs(UnmanagedType.Bool)> Boolean 21: ShowWindowAsync
Public Function ShowWindowAsync(hWnd As IntPtr, <MarshalAs(UnmanagedType.I4)>nCmdShow As ShowWindowCommands) As <MarshalAs(UnmanagedType.Bool)> Boolean 22: WinHelpCommands
///<Summary>Commands to pass to WinHelp()</Summary>
enum WinHelpCommands : uint
HELP_COMMAND = 0x0102;
'''<Summary>Commands to pass to WinHelp()</Summary>
Public Enum WinHelpCommands As UInteger
HELP_COMMAND = &H0102
Public Enum WinHelpCommands
HELP_COMMAND As Long = &H0102 kernel3223: AllocConsole If you need to check for an existing console (ie, if the program was launched from the command window) please see AttachConsole, 24: AttachConsole, When running an application that is GUI from a console window, you may want to echo something to that console window (such as command line options when the user specifies /? on the command line), but also don't want a console window popping up when you don't need it (such is the behavior of a windows C# 'Console Application'). In this case these work great, and are fully compatible thereafter with the .NET Console.xxx static functions. 25: AttachConsole When running an application that is GUI from a console window, you may want to echo something to that console window (such as command line options when the user specifies /? on the command line), but also don't want a console window popping up when you don't need it (such is the behavior of a windows C# 'Console Application'). In this case these work great, and are fully compatible thereafter with the .NET Console.xxx static functions. 26: ConsoleFunctions
public uint dwCommandId; 27: CreateProcess
string lpCommandLine,
lpCommandLine As String, _
string CommandLine = @" c:\boot.ini";
retValue = CreateProcess(Application,CommandLine,
Dim CommandLine As String = " c:\boot.ini"
retValue = CreateProcess(Application, CommandLine, pSec, tSec, False, NORMAL_PRIORITY_CLASS, IntPtr.Zero, vbNull, sInfo, pInfo) 28: DeviceIoControl
DiskSmartSendDriveCommand = (EFileDevice.Disk << 16) | (0x0021 << 2) | EMethod.Buffered | (FileAccess.ReadWrite << 14),
Private Const DFP_SEND_DRIVE_COMMAND As Integer = &H7C084
Dim bFeaturesReg As Byte ' // Used for specifying SMART "commands".
Dim bCommandReg As Byte ' // Actual IDE command.
Dim bDriveNumber As Byte ' Physical drive number to send command to (0,1,2,3).
'Issue a Command GET VERSION and test results
'Issue a full IDE Command
.bCommandReg = CByte(IDE_ID_FUNCTION) 29: GetCommandLine
private static extern System.IntPtr GetCommandLine(); The original GetCommandLine function returns a pointer to a buffer allocated and owned by the operating system. When marshaling strings as return types, the interop marshaler assumes it must free the memory that the original LPTSTR type pointed to by the function. To prevent the marshaler from automatically reclaiming this memory, the managed GetCommandLine prototype returns an IntPtr type instead of a string. The Marshal.PtrToStringAuto method copies the unmanaged LPSTR type to a managed string object, widening the character format, if required. Use this API function when you need access to raw command line string and not already parsed arguments in Main(string[] args) System.IntPtr ptr = GetCommandLine(); string commandLine = Marshal.PtrToStringAuto(ptr); Environment.CommandLine 30: GetConsoleWindow
Private Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As ShowWindowCommands) As Boolean
Enum ShowWindowCommands As Integer
ShowWindow(hwnd, ShowWindowCommands.ShowMinimized) 31: NetBIOS
public Commands ncb_command; /* command code */
/* state when an ASYNCH command */
Dim ncb_command As Byte
myNcb.ncb_command = NCBENUM
' execute the NetBIOS command
myNcb.ncb_command = NCBRESET
' execute the NetBIOS command
myNcb.ncb_command = NCBASTAT
' execute the NetBIOS command
' issue all commands to the NetBIOS protocol
Public ncbCommand As Byte
static extern int RegisterApplicationRestart([MarshalAs(UnmanagedType.LPWStr)] string commandLineArgs, int Flags);
Declare Function RegisterApplicationRestart Lib "kernel32.dll" (commandLineArgs As String, Flags As Integer) As Integer commandLineArgs A pointer to a Unicode string that specifies the command-line arguments for the application when it is restarted. The maximum size of the command line that you can specify is RESTART_MAX_CMD_LINE characters. Do not include the name of the executable in the command line; this function adds it for you. If this parameter is NULL or an empty string, the previously registered command line is removed. If the argument contains spaces, use quotes around the argument. Your initial registration for restart must occur before the application encounters an unhandled exception or becomes unresponsive. You could then call this function from inside your recovery callback to update the command line.
private static extern uint RegisterApplicationRestart(string pwsCommandLine, RestartFlags dwFlags); gsapi
// execute this command, to convert pdf to tiff hhctrl34: HtmlHelp
HTMLHelpCommand command,
public enum HTMLHelpCommand : uint
ByVal uCommand As Integer, ByVal dwData As IntPtr) As Integer
Public Enum HTMLHelpCommand
HTMLHelp(Nothing, filePath, HTMLHelpCommand.HH_HELP_CONTEXT, contextID)
HTMLHelp(Nothing, filePath, HTMLHelpCommand.HH_DISPLAY_TOC, 0)
HtmlHelp(IntPtr.Zero, filePath, HTMLHelpCommand.HH_HELP_CONTEXT, contextID)
HtmlHelp(IntPtr.Zero, filePath, HTMLHelpCommand.HH_DISPLAY_TOC, 0)
HTMLHelpCommand uCommand,
HtmlHelp(IntPtr.Zero, null, HTMLHelpCommand.HH_DISPLAY_TEXT_POPUP, param); coredll35: AppendMenu
uint MF_BYCOMMAND = 0x00000000; 36: CreateProcess
string lpCommandLine, 37: EnableMenuItem
uint MF_BYCOMMAND = 0x00000000; Use MF_BYCOMMAND to specify the item ID on [itemId] parameter or use MF_BYPOSITION to specify the zero-based index of the item, if neither MF_BYCOMMAND nor MF_BYPOSITION is specified the item ID is used.
EnableMenuItem(hMenu, 1002, MF_BYCOMMAND | MF_GRAYED); 38: NOTIFYICONDATA
uint WM_COMMAND = 0x0111; 39: ShowWindow nCmdShow is an integer type parameter specifying how the window is to be shown. See ShowWindowCommand userenvTo build: run the following commands at bash command prompt, after copying an icon file, say bfe.ico, to the cwd: shlwapi41: AssocCreate
COMMAND = 1,
DDECOMMAND,
qa.GetString(ASSOCF.NOTRUNCATE, ASSOCSTR.COMMAND,
qa.GetString(ASSOCF.NOTRUNCATE, ASSOCSTR.COMMAND,
Console.WriteLine("No command line is associated to .doc print verb."); 42: AssocQueryString
Command = 1,
DDECommand, 43: PathGetArgs
/// Finds the command line arguments within a given path.
''' Finds the command line arguments within a given path. comctl3244: TaskDialog
/// <summary>The TaskDialogIndirect function creates, displays, and operates a task dialog. The task dialog contains application-defined icons, messages, title, verification check box, command links, push buttons, and radio buttons. This function can register a callback function to receive notification messages.</summary>
/// <summary>The TaskDialogIndirect function creates, displays, and operates a task dialog. The task dialog contains application-defined icons, messages, title, verification check box, command links, push buttons, and radio buttons. This function can register a callback function to receive notification messages.</summary> ws2_3246: Command 47: ioCommand 48: ioctlsocket
public static extern int ioctlsocket(IntPtr s, Command cmd, ref int argp);
//Native.ioctlsocket(this.socketPtr, Native.Command.FIONREAD, ref BufferRet); 49: WSAIoctl
//Native.ioctlsocket(this.socketPtr, Native.Command.FIONREAD, ref BufferRet); gdi3250: TextOut TextOut, unlike the Text property, have to be called every time Windows asks for a control to repaint. By using the Graphics.CopyFromScreen method one can copy the output of a Textout command and use that for repainting. Unlike graphics.drawstring, Textout can work with fonts other than True Type, Open Type, and PostScript fonts. If you have a font that's supported by Windows but not .net you can most likely use this command to draw it. winscard51: SCardTransmit
byte[] sendBytes = new byte[] { 0xFF, 0xCA, 0x00, 0x00, 0x00 }; //get UID command for iClass cards mpr
CONNECT_COMMAND_LINE = 0X800,
COMMANDLINE = 0x00000800, printui54: PrintUIEntryW Get available commands in dialup box setupapi55: Option Explicit Private Sub Command1_Click() comdlg3256: FtpCommand
static extern bool FtpCommand(IntPtr hConnect, bool fExpectResponse, [MarshalAs(UnmanagedType.U4)] int dwFlags, string lpszCommand, IntPtr dwContext, ref IntPtr phFtpCommand);
Private Shared Function FtpCommand(ByVal hConnect As IntPtr, ByVal fExpectResponse As Boolean, <MarshalAs(UnmanagedType.U4)> ByVal dwFlags As Integer, ByVal lpszCommand As String, ByVal dwContext As IntPtr, ByRef phFtpCommand As IntPtr) As Boolean 57: GetOpenFileName tcc (http://bellard.org/tcc/) command line to compile: gcc (under cygwin) command line to compile: wininet58: FtpCommand
public static extern bool FtpCommandA
[MarshalAs(UnmanagedType.VBByRefStr)] ref string lpszCommand,
IntPtr phFtpCommand);
Declare Function FtpCommandA Lib "wininet.dll" _
ByVal lpszCommand As String, _
ByVal phFtpCommand As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean lpszCommand (in) A pointer to a string that contains the command to send to the FTP server. phFtpCommand (out) A pointer to a handle that is created if a valid data socket is opened. The fExpectResponse parameter must be set to TRUE for phFtpCommand to be filled.
Dim ret As Boolean = FTPCommandA(ConnectionHandle, False, 0, sCommand, IntPtr.Zero, IntPtr.Zero) winmm59: 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
string sCommand = "open \"" + strFilePath + "\" type mpegvideo alias MediaFile";
mciSendString(sCommand, null, 0, 0);
sCommand = "play MediaFile notify";
mciSendString(sCommand, null, 0, _frmObject.Handle.ToInt64());
static extern Int32 mciSendString(string command, string buffer, int bufferSize, IntPtr hwndCallback);
private void EjectCdCommand()
private void CloseCdCommand()
Dim sCommand As String = "open """ + strFilePath + """ type waveaudio alias MediaFile"
mciSendString(sCommand, Nothing, 0, IntPtr.Zero)
sCommand = "play MediaFile notify"
mciSendString(sCommand, Nothing, 0, Me.Handle.ToInt64()) advapi32
failureActions.lpCommand = ""; Cut off search results after 60. Please refine your search. |