Desktop Functions: Smart Device Functions:
|
Search Results for "Close" in [All]advapi32
NativeMethods.CloseHandle(tokenHandle);
internal static extern Boolean CloseHandle(IntPtr hObject);
Private Function CloseHandle(ByVal hHandle As IntPtr) As Boolean
CloseHandle(hToken)
static extern bool CloseEventLog(IntPtr hEventLog);
CloseEventLog(logHandle);
// Make sure to close open handles
CloseServiceHandle(svcHandle);
CloseServiceHandle(scHandle);
// Make sure to close open handles
CloseServiceHandle(svcHandle);
CloseServiceHandle(scHandle);
// Ensure any open handle is closed.
NativeMethods.CloseEventLog(hEventLog);
static extern bool CloseEventLog(IntPtr hEventLog);
Declare Function CloseEventLog Lib "advapi32.dll" (TODO) As TODO
public static extern bool CloseServiceHandle( IntPtr hSCObject );
Private Shared Function CloseServiceHandle(ByVal serviceHandle As IntPtr) As Boolean
Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hSCObject As IntPtr) As Boolean Handles returned from CreateService must be closed using this function, rather than the standard CloseHandle
Interop.CloseServiceHandle (serviceHandle);
Interop.CloseServiceHandle (serviceControlManagerHandle);
internal static extern bool CloseServiceHandle (IntPtr hSCObject);
Public Function CloseHandle(ByVal handle As IntPtr) As Boolean
CloseHandle(processInfo.process)
CloseHandle(processInfo.thread)
public static extern bool CloseHandle(IntPtr handle);
CloseHandle(processInfo.process);
CloseHandle(processInfo.thread); 10: CreateService
CloseServiceHandle(serviceHandle)
CloseHandle(scHandle) 11: DeleteService
#region CloseServiceHandle
static extern bool CloseServiceHandle( IntPtr hSCObject );
CloseServiceHandle( schSCManager );
// if you don't close this handle, Services control panel
CloseServiceHandle( schService );
CloseServiceHandle( hService );
CloseServiceHandle( handle );
CloseServiceHandle(handle); 14: GetSecurityInfo
fileStream.Close();
CloseHandle(lngTokenHandle)
bool bForceAppsClosed,
<MarshalAs(UnmanagedType.Bool)> ByVal bForceAppsClosed As Boolean, _
bool bForceAppsClosed,
<MarshalAs(UnmanagedType.Bool)> ByVal bForceAppsClosed As Boolean, _
LsaClose(Policy)
LsaClose(Policy) 19: LsaClose
static extern uint LsaClose(IntPtr ObjectHandle);
Declare Unicode Function LsaClose Lib "advapi32.dll" (ByVal ObjectHandle As IntPtr) As Int32
internal static extern int LsaClose(IntPtr PolicyHandle);
Win32Sec.LsaClose(lsaHandle);
LsaClose(Policy)
LsaClose(Policy) 21: LsaLookupSids
internal static extern int LsaClose(IntPtr PolicyHandle);
Win32Sec.LsaClose(lsaHandle); 22: LsaOpenPolicy When done with the handle, call LsaClose
LsaClose( aPolicyHandle );
LsaClose(policy);
private static extern long LsaClose(IntPtr ObjectHandle);
LsaClose(Policy)
LsaClose(Policy)
LsaClose(Policy)
LsaClose(Policy)
private static extern uint LsaClose(
uint ntsResult = LsaClose(LsaPolicyHandle);
throw new Exception("LsaClose failed: " + winErrorCode); 25: OpenEventLog
CloseEventLog(logHandle); 26: OpenProcessToken The access token handle that is returned by TokenHandle should be closed using CloseHandle (kernel32) when you are finished using it. 27: OpenSCManager
CloseServiceHandle(scHandle)
CloseServiceHandle( handle ); 28: OpenThreadToken
private static extern bool CloseHandle(IntPtr handle);
if (!CloseHandle(hToken))
System.Diagnostics.Trace.WriteLine("Could not close cloak token!, error 0x" + dw.ToString("x4"), "Impersonation"); ; 29: RegCloseKey
public static extern int RegCloseKey(
Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As UIntPtr) As Integer
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Integer) _
RegCloseKey(hkeyKeytoOpen) Microsoft.Win32.RegistryKey.Close() Method. 30: RegEnumKeyEx
Throw New ApplicationException("Cannot access a closed registry key") 31: RegEnumValue
Throw New ApplicationException("Cannot access a closed registry key")
// The "Close()" will trigger RegNotifyChangeKeyValue if it is still listening
this._monitorKey.Close(); 33: RegOpenKey
Throw New ApplicationException("Cannot access a closed registry key")
RegCloseKey(hKey); When I tested this API code in a tight loop, to get a value, and using the traditional RegistryKey.Close() on the returned subkey, I found that it leaked RegistryHandles. 34: RegOpenKeyEx
Throw New ApplicationException("Cannot access a closed registry key")
RegCloseKey(hKey); 35: RegQueryValue
'Don't forget to close the key ressource
environmentReg.Close()
RegCloseKey(hKey);
RegCloseKey(hKey); 36: RegQueryValueEx
'Don't forget to close the key ressource
environmentReg.Close()
RegCloseKey(hKey);
RegCloseKey(hKey); 37: RegSetValueEx Provided you specify true in the SafeRegistryHandle constructor, there is then no need to call RegCloseKey either.
RegCloseKey(hKey); 38: SaferCloseLevel
public static extern bool SaferCloseLevel(IntPtr hLevelHandle);
Declare Function SaferCloseLevel Lib "advapi32.dll" (ByVal hLevelHandle As Long) As Long 39: SaferCreateLevel Don't forget to close the handle using SaferCloseLevel. 40: StartService
CloseServiceHandle(scManager.ToInt32)
CloseServiceHandle(hSCManager)
Me.Close() wininet42: FtpFindFirstFile
InternetCloseHandle(hFind) ' close the handle. 43: FtpGetFile
[DllImport("wininet.dll", EntryPoint = "InternetCloseHandle")]
public static extern long InternetCloseHandle(IntPtr hInet);
InternetCloseHandle(ftpHandle);
InternetCloseHandle(internetHandle);
public void CloseFTP()
CloseFTP();
static extern bool InternetCloseHandle(IntPtr hInternet);
Public Declare Function InternetCloseHandle Lib "wininet.dll" ( _ 45: InternetConnect To close the handle returned from InternetConnect, the application should call InternetCloseHandle. This function disconnects the client from the server and frees all resources associated with the connection. uxtheme46: CloseThemeData
public extern static Int32 CloseThemeData(IntPtr hTheme);
Declare Function CloseThemeData Lib "uxtheme.dll" (ByVal hTheme As IntPtr) As Int32
Function CloseThemeData(ByVal hTheme As IntPtr) As Int32 47: GetThemePartSize
WP_CLOSEBUTTON = 18,
WP_SMALLCLOSEBUTTON = 19,
WP_MDICLOSEBUTTON = 20,
// Close Button States ole3248: StgOpenStorage
CloseStorageRoot(storageRoot);
private static void CloseStorageRoot(StorageInfo storageRoot)
InvokeStorageRootMethod(storageRoot, "Close"); ws2_3249: closesocket
public static extern int closesocket(IntPtr s);
Declare Function closesocket Lib "ws2_32.dll" (TODO) As TODO
static public void CloseSock(Socket sck)
// to close the receiving and sending functions of the socket
closesocket(sck.Handle);
/// linger on close if data present 52: WSASocket
// linger on close if data present miscWhen I expand a desktop function and then click on a sub function, my expanded list closes. This makes it difficult to go through and browse a dll. shlwapi54: 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. odbc3255: SQLBindCol
SQLFreeStmt(stmtHandle, SQL_CLOSE); 56: SQLDisconnect
57: SQLFreeStmt
58: SQLTables
const int SQL_CLOSE = 0; winspool59: ClosePrinter
static extern int ClosePrinter(IntPtr hPrinter);
<DllImport("winspool.drv", EntryPoint:="ClosePrinter", _
Private Shared Function ClosePrinter(ByVal hPrinter As Int32) As Boolean 60: OpenPrinter
ClosePrinter(pHandle); Cut off search results after 60. Please refine your search. |