Desktop Functions: Smart Device Functions:
|
Search Results for "Close" in [All]Constants1: BM_CLICK
//SetBitmap(hWnd, (isPlaylistVisible ? IDB_RESTORE_PRESSED : IDB_CLOSE_PRESSED)); 2: EMR_
EMR_CLOSEFIGURE = 61,
LINE_CLOSE = 3, 4: LR_
/// in the resource file closest to the desired size. This will succeed only if hImage was loaded by LoadIcon or LoadCursor,
''' in the resource file closest to the desired size. This will succeed only if hImage was loaded by LoadIcon or LoadCursor, 5: O_
const int _O_TEMPORARY = 0x0040; /* Temporary file bit - file is deleted when last handle is closed */ 6: PROPERTYKEY
public static PropertyKey PKEY_RecordedTV_IsClosedCaptioningAvailable = new PropertyKey( 0x6D748DE2, 0x8D38, 0x4CC3, 0xAC, 0x60, 0xF0, 0x09, 0xB0, 0x57, 0xC5, 0x57, 12);
public static PropertyKey PKEY_Search_IsClosedDirectory = new PropertyKey( 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);
public static PropertyKey WPD_COMMAND_OBJECT_RESOURCES_CLOSE = new PropertyKey(0xB3A2B22D, 0xA595, 0x4108, 0xBE, 0x0A, 0xFC, 0x3C, 0x96, 0x5F, 0x3D, 0x4A, 7);
static extern bool CloseHandle(IntPtr hHandle);
CloseHandle(hToken); 8: ShellAPI
public const int SEE_MASK_NOCLOSEPROCESS = 0x00000040; 9: ShellAPI
public const int SEE_MASK_NOCLOSEPROCESS = 0x00000040; 10: WINBASE
private const uint FILE_FLAG_DELETE_ON_CLOSE = 0x04000000;
public const int FSCTL_OPBATCH_ACK_CLOSE_PENDING = 0x00090010;
public const int FSCTL_WRITE_USN_CLOSE_RECORD = 0x000900ef; 11: WINERROR
/// The semaphore is set and cannot be closed.
/// The pipe is being closed.
/// The network connection was gracefully closed.
/// The RPC pipe object has already been closed.
public const int RPC_X_PIPE_CLOSED = 1916;
/// Unable to open or close the inject/eject port.
/// A close operation is pending on the session.
public const int ERROR_CTX_CLOSE_PENDING = 7007;
/// The unicodePwd attribute value must be enclosed in double quotes.
/// The Global catalog server is not in the closest site.
public const int ERROR_DS_NOT_CLOSEST = 8588;
/// An existing connection was forcibly closed by the remote host.
public const int ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = 14045;
/// Manifest Parse Error : The following tags were not closed: %1.
public const int ERROR_SXS_XML_E_UNCLOSEDTAG = 14052;
/// Manifest Parse Error : Element was not closed.
public const int ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = 14060;
public const int ERROR_SXS_XML_E_UNCLOSEDENDTAG = 14061;
/// Manifest Parse Error : A string literal was not closed.
public const int ERROR_SXS_XML_E_UNCLOSEDSTRING = 14062;
/// Manifest Parse Error : A comment was not closed.
public const int ERROR_SXS_XML_E_UNCLOSEDCOMMENT = 14063;
/// Manifest Parse Error : A declaration was not closed.
public const int ERROR_SXS_XML_E_UNCLOSEDDECL = 14064;
/// Manifest Parse Error : A CDATA section was not closed.
public const int ERROR_SXS_XML_E_UNCLOSEDCDATA = 14065;
/// CloseClipboard Failed
public const int CLIPBRD_E_CANT_CLOSE = (int)(0x800401D4 - 0x100000000);
/// XACT_E_TRANSACTIONCLOSED
public const int XACT_E_TRANSACTIONCLOSED = (int)(0x8004D083 - 0x100000000);
/// Unable to close a serialization handle or a file handle.
public const int CO_E_FAILEDTOCLOSEHANDLE = (int)(0x80010138 - 0x100000000);
/// Final closure is pending until additional frees or closes.
public const int CRYPT_E_PENDING_CLOSE = (int)(0x8009200F - 0x100000000);
public const int OSS_CANT_CLOSE_TRACE_FILE = (int)(0x8009302E - 0x100000000); 12: WM
private const UInt32 WM_CLOSE = 0x0010;
WM_CLOSE = &H10
WM_CLOSE equ 010h user3213: CloseClipboard 14: CloseDesktop
static extern bool CloseDesktop(IntPtr hDesktop);
Shared Function CloseDesktop(ByVal hDesktop As IntPtr) As Boolean 15: CloseHandle
static extern bool CloseHandle(IntPtr hHandle);
Private Shared Function CloseHandle(ByVal hHandle As IntPtr) As Boolean 16: CloseWindow
static extern int CloseWindow (IntPtr hWnd);
Declare Function CloseWindow Lib "user32.dll" (TODO) As TODO 17: CloseWindow 19: CreateDesktop
// ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/closedesktop.htm
[DllImport("user32.dll", EntryPoint="CloseDesktop", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern bool CloseDesktop(IntPtr handle);
' ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/closedesktop.htm
<DllImport("user32.dll", EntryPoint:="CloseDesktop", CharSet:=CharSet.Unicode, SetLastError:=True)> _
Public Shared Function CloseDesktop(ByVal handle As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
protected override bool CloseNativeHandle(IntPtr handle)
return WindowStationAndDesktop.CloseDesktop(handle); 20: CreatePopupMenu
rk.Close();
rk.Close();
rk.Close(); 21: CreateWindow
/// Close the native handle. The real call is dependent on whether it is
/// <param name="handle">Handle to be closed.</param>
protected abstract bool CloseNativeHandle(IntPtr handle);
bool closed = CloseNativeHandle(this.handle);
if (closed)
return closed;
protected override bool CloseNativeHandle(IntPtr handle)
return WindowStationAndDesktop.CloseWindowStation(handle); 22: DeleteMenu
internal const UInt32 SC_CLOSE =0xF060;
SC_CLOSE = &HF060 23: DestroyWindow hWnd is the pointer to the window you want to close/destroy. Create a new IntPtr object with the window's handle as a parameter to it's constructor. Make sure the pointers are in decimal, not in hex as spy++ gives them to you.
//Closes the form
btnCloseWindow_Click(object sender, EventArgs e) [System.Windows.Forms.Form.Close]
/// Close button
DFCS_CAPTIONCLOSE = 0, The buttons are drawn by vectors so to draw a "menu" close icon simply draw a DFCS_CAPTIONCLOSE button with the size of SM_CXMENUCHECK/SM_CYMENUCHECK. 25: DrawMenuBar
public static void RemoveCloseButton(Form frm) 26: EmptyClipboard
CloseClipboard(); 27: EnableMenuItem
Private Const SC_CLOSE As Integer = &HF060
EnableMenuItem(GetSystemMenu(Me.Handle, False), SC_CLOSE, MF_GRAYED) 28: EndTask
static extern bool CloseClipboard();
CloseClipboard();
private const UInt32 WM_CLOSE = 0x0010;
// Try closing application by sending WM_CLOSE to all child windows in all threads.
// Try to close main window.
if(proc.CloseMainWindow())
proc.Close();
// Close the enumerated window.
PostMessage(hWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
Private Const WM_CLOSE As UInt32 = &H10
' Try closing application by sending WM_CLOSE to all child windows in all threads.
' Try to close main window.
If proc.CloseMainWindow() Then
proc.Close()
' Close the enumerated window.
PostMessage(hWnd, WM_CLOSE, IntPtr.Zero, IntPtr.Zero) 31: FindWindowEx Here is an alternative Managed API to FindWindow, The article also describes a way to CloseWindow of another process like notepad, not sure if there is such thing in Win32 API, but at least you can do it in .NET! Here is the article: 32: GetClipboardData
CloseClipboard();
static extern bool CloseClipboard();
CloseClipboard(); 34: GetMenuItemCount
public static void RemoveCloseButton(Form frm)
return SafeNativeMethods.CloseWindowStation(handle); Quote from MSDN: "The CloseWindowStation function closes an open window station handle. Do not specify the handle returned by the GetProcessWindowStation function." 36: GetSystemMenu
public static void RemoveCloseButton(Form frm)
private const Int32 SC_CLOSE = 0xF060;
public static void RemoveConsoleCloseButton()
DeleteMenu(hMenu, SC_CLOSE, MF_GRAYED); 37: LoadCursor
Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed
Private Sub Form_Closed(ByVal sender As System.Object, ByVal e As FormClosedEventArgs) Handles MyBase.FormClosed 39: ModifyMenu
uint close= GetMenuItemID(hmenusys , 6);
ModifyMenu(hmenusys, close, 0X0, (IntPtr) min, "Close");
ModifyMenu(hmenusys, max, 0X0, (IntPtr)close, "Maximize"); 40: NaF Function You can close this page. this is not function. 41: OpenClipboard
CloseClipboard();
return SafeNativeMethods.CloseWindowStation(handle); See [Enums.ACCESS_MASK] and [CloseWindowStation]. 43: RemoveMenu
public static void RemoveCloseButton(Form frm)
//Removes the actual Close button
//Removes the seperator between the Close button and the Maximize button 44: SB_GETTEXT
private static extern int CloseHandle(
// Close the process handle
StatusBar.CloseHandle(hProcess);
'In this example, we've opened a Notepad instance, entered some text, and clicked the 'X' to close Notepad. Here is an alternative Managed API to FindWindow, The article also describes a way to CloseWindow of another process like notepad, not sure if there is such thing in Win32 API, but at least you can do it in .NET! Here is the article: 47: UnregisterHotKey
Me.Close() winscardkernel3249: AddAtom [System.String.Intern] is the closest thing, although an atom is different from a string. 50: CloseHandle
static extern bool CloseHandle(IntPtr hObject);
Public Shared Function CloseHandle(ByVal hObject As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal hObject As IntPtr) As Boolean
Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
static def CloseHandle(hObject as IntPtr) as bool: For .NET 2.0, consider using Microsoft.Win32.SafeHandles.SafeFileHandle instead. It can be used where IntPtr is used. If you use a SafeFileHandle, do not call CloseHandle as the CLR will close it for you (even if it's already closed).
static extern unsafe bool CloseHandle(
CloseHandle(hMapFile) 51: ConsoleFunctions
// so we want to use LayoutKind.Explicit to mimic it as closely
CTRL_CLOSE_EVENT, - Save the current buffer information so you can restore it when close it your buffer 53: CreateEvent
are.Close();
CloseHandle(myEventHandle); NOTE: This class needs some changes. The CloseHandle call will destroy the event when the last handle is closed. This makes it hard for one application to "lock" the event while making another wait on it since this class is always closing the handle. An alternative that I found to work is to have the CreateEvent call in the constructor and implement IDisposable by moving the CloseHandle call to the Dispose method.
static extern bool CloseHandle(IntPtr hObject);
CloseHandle( _Handle );
CloseHandle( _Handle );
CloseHandle( _Handle );
CloseHandle( _Handle ); 54: CreateFile
Win32API.CloseHandle(_hMMF);
_fs.Close();
internal static extern bool CloseHandle(IntPtr hFile);
Win32API.CloseHandle(_hMMF);
_fs.Close();
internal static extern bool CloseHandle(IntPtr hFile); 56: CreateMutex
mutex.Close(); 57: CreateNamedPipe
/// then call Close();
private static extern bool CloseHandle(IntPtr handle);
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
public override void Close()
CloseHandle(_handle);
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
sw.Close();
private static extern bool CloseHandle([In] IntPtr hObject);
CloseHandle(handleToSnapshot); 59: DeviceIoControl
FsctlOpBatchAckClosePending = (EFileDevice.FileSystem << 16) | (4 << 2) | EMethod.Buffered | (0 << 14),
FsctlWriteUsnCloseRecord = (EFileDevice.FileSystem << 16) | (59 << 2) | EMethod.Neither | (0 << 14),
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
CloseHandle(hdrive) 60: DuplicateHandle
DUPLICATE_CLOSE_SOURCE = (0x00000001),// Closes the source handle. This occurs regardless of any error status returned. Cut off search results after 60. Please refine your search. |