Desktop Functions: Smart Device Functions:
|
Search Results for "Close" in [All]winmm
private void CloseCdCommand()
mciSendString("set CDAudio door closed", rt, 127, IntPtr.Zero); 2: midiInClose 3: midiOutClose
static extern uint midiOutClose(IntPtr hMidiOut);
Declare Function midiOutClose Lib "winmm.dll" (ByRef phMidiOut As IntPtr) As Uinteger 4: midiOutOpen The device should be disposed with midiOutClose when not needed anymore.
extern static Int32 midiStreamClose(IntPtr hMidiStream);
Public Declare Function midiStreamClose Lib "winmm.dll" (ByVal hMidiStream As IntPtr) As Integer 6: mixerClose
static extern Int32 mixerClose(IntPtr hmx);
Declare Function mixerClose Lib "winmm.dll" (ByVal hmx As IntPtr) As Integer
oWriter.Close(); 8: waveInClose
static extern uint waveInClose(IntPtr hwi);
Shared Function waveInClose(<MarshalAs(UnmanagedType.I4)> ByVal hwi As Integer) As MMRESULT 9: waveOutClose
public static extern uint waveOutClose(IntPtr hwo);
Declare Auto Function waveOutClose Lib "winmm.dll" (ByVal hwo As IntPtr) As UInteger I release the unmanaged memory allocated in the Open() method in the class's Close method: 11: WIMMessages
MM_WIM_CLOSE = 0x03BF,
WIM_CLOSE = &H3BF userenv12: LoadUserProfile Upon successful return, the hProfile member of PROFILEINFO is a registry key handle opened to the root of the user's hive. It has been opened with full access (KEY_ALL_ACCESS). If a service that is impersonating a user needs to read or write to the user's registry file, use this handle instead of HKEY_CURRENT_USER. Do not close the hProfile handle. Instead, pass it to the UnloadUserProfile function. This function closes the handle. You should ensure that all handles to keys in the user's registry hive are closed. If you do not close all open registry handles, the user's profile fails to unload. For more information, see Registry Key Security and Access Rights and Registry Hives. mpr13: WNetCloseEnum
public static extern uint WNetCloseEnum(IntPtr hEnum);
Private Shared Function WNetCloseEnum(hEnum As IntPtr) As UInteger 14: WNetEnumResource
public static extern int WNetCloseEnum( IntPtr hEnum );
iRet =WNetCloseEnum( ptrHandle );
Public Function WNetCloseEnum(ByVal hEnum As IntPtr) As Integer
iRet = WNetCloseEnum(ptrHandle)
iRet = WNetCloseEnum(ptrHandle)
iRet = WNetCloseEnum(ptrHandle) winhttp
static extern bool WinHttpCloseHandle(IntPtr hInternet);
Declare Function WinHttpCloseHandle Lib "winhttp.dll" (ByVal hInternet As IntPtr) As Boolean ERROR_WINHTTP_LOGIN_FAILURE - The login attempt failed. When this error is encountered, close the request handle with WinHttpCloseHandle. A new request handle must be created before retrying the function that originally produced this error. ERROR_WINHTTP_OPERATION_CANCELLED - The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed. shlwapi17: PathQuoteSpaces
/// Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks.
''' Searches a path for spaces. If spaces are found, the entire path is enclosed in quotation marks. shell3218: ITaskbarList3
/// Removes a thumbnail from an application's preview group when that tab or document is closed in the application. 19: SHAppBarMessage
'Eventhandler Form Close 20: ShellExecuteEx
SEE_MASK_NOCLOSEPROCESS = 0x00000040, dtl21: DTL_C_DEFINE
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 22: DTL_DRIVER_CLOSE
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
Declare Function DTL_DRIVER_CLOSE Lib "dtl.dll" (TODO) As TODO
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout);
public void CloseDriver()
Dtl.DtlDriverClose(_driverId, TimeoutInMs); 23: DTL_DRIVER_OPEN
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 24: DTL_ERROR_S
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 25: DTL_INIT
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 26: DTL_READ_W
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 27: DTL_UNDEF
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 28: DTL_UNINIT
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); 29: DTL_WRITE_W
/// Close Dtl driver
/// <param name="driverId">specifies driver to close</param>
public static int DtlDriverClose(int driverId, int timeOut)
return (UnsafeNativeMethods.DTL_DRIVER_CLOSE(driverId, timeOut));
static extern public int DTL_DRIVER_CLOSE(int driver_id, int timeout); rapi30: CeCloseHandle
public static extern bool CeCloseHandle(int hObject); function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeCloseHandleRAPI.asp 31: CeFindClose
static extern bool CeFindClose(int hFindFile);
Declare Function CeFindClose Lib "rapi.dll" (hFindFile As Integer) As Boolean 32: CeFindNextFile
CeFindClose(hResult); 33: CeRegCloseKey
public static extern int CeRegCloseKey(uint hkey); function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeRegCloseKeyRAPI.asp
// if CeRegQueryValueEx fails then close already opened reg
CeRegCloseKey(key); CeRegCloseKey(key); 34: CeRegCreateKeyEx
CeRegCloseKey(key2);
CeRegCloseKey(key); 35: CeRegDeleteKey
CeRegCloseKey(key);
CeRegCloseKey(key); 37: CeRegSetValueEx
CeRegCloseKey(key);
CeRegCloseKey(key) user3238: CloseClipboard 39: CloseDesktop
static extern bool CloseDesktop(IntPtr hDesktop);
Shared Function CloseDesktop(ByVal hDesktop As IntPtr) As Boolean 40: CloseHandle
static extern bool CloseHandle(IntPtr hHandle);
Private Shared Function CloseHandle(ByVal hHandle As IntPtr) As Boolean 41: CloseWindow
static extern int CloseWindow (IntPtr hWnd);
Declare Function CloseWindow Lib "user32.dll" (TODO) As TODO 42: CloseWindow 44: 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); 45: CreatePopupMenu
rk.Close();
rk.Close();
rk.Close(); 46: 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); 47: DeleteMenu
internal const UInt32 SC_CLOSE =0xF060;
SC_CLOSE = &HF060 48: 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. 50: DrawMenuBar
public static void RemoveCloseButton(Form frm) 51: EmptyClipboard
CloseClipboard(); 52: EnableMenuItem
Private Const SC_CLOSE As Integer = &HF060
EnableMenuItem(GetSystemMenu(Me.Handle, False), SC_CLOSE, MF_GRAYED) 53: 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) 56: 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: 57: GetClipboardData
CloseClipboard();
static extern bool CloseClipboard();
CloseClipboard(); 59: 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." Cut off search results after 60. Please refine your search. |