Desktop Functions: Smart Device Functions:
|
Search Results for "Close" in [All]gdiplus
static extern int GdipAddPathClosedCurveI(HandleRef path, HandleRef memorypts,
Declare Function GdipAddPathClosedCurveI Lib "gdiplus.dll" (TODO) As TODO
static extern int GdipAddPathClosedCurve2I(HandleRef path, HandleRef memorypts,
Declare Function GdipAddPathClosedCurve2I Lib "gdiplus.dll" (TODO) As TODO
static extern int GdipClosePathFigures(HandleRef path);
Declare Function GdipClosePathFigures Lib "gdiplus.dll" (TODO) As TODO msiThe sample application below demonstrates how to use MsiRecordSetString, MsiOpenDatabase, MsiCreateRecord, MsiCloseHandle, MsiDatabaseOpenView, MsiViewExecute, MsiDatabaseCommit, and MsiViewClose in C# to modify a property value in an MSI database. To run it, simply create a new Windows Console application and replace the code that Visual Studio gives you with the code below. You may have to modify the namespace name. The sample as-is requires a valid MSI database named SETUP.msi, with a property named PROPERTY1 in the Property table, to be located in C:\. You can of course change the path to your MSI database in the calls to ChangeMSIProperty() in Main() and use any existing property you wish.
static extern int MsiCloseHandle(IntPtr hAny);
static extern int MsiViewClose(IntPtr viewhandle);
// Close the view.
returnValue = (WINDOWS_MESSAGE_CODES)MsiViewClose(msiView);
// Failed to close the view.
throw new MsiInstallationSupportException(string.Format(CultureInfo.InvariantCulture, "MsiViewClose returned error code {0}.", returnValue.ToString()));
// Close handles or you could get a corrupted database and un-closed handles.
MsiCloseHandle(msiRecord);
MsiCloseHandle(msiView);
MsiCloseHandle(msiHandle); 10: MsiViewClose
static extern int MsiViewClose(IntPtr viewhandle);
Declare Function MsiViewClose Lib "msi.dll" (TODO) As TODO uxtheme11: 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 12: GetThemePartSize
WP_CLOSEBUTTON = 18,
WP_SMALLCLOSEBUTTON = 19,
WP_MDICLOSEBUTTON = 20,
// Close Button States wlanapi13: WlanCloseHandle
[DllImport("Wlanapi", EntryPoint = "WlanCloseHandle")]
public static extern uint WlanCloseHandle([In] IntPtr hClientHandle,
<DllImport("Wlanapi", EntryPoint := "WlanCloseHandle")> _
Public Shared Function WlanCloseHandle(<[In]> ByVal hClientHandle As IntPtr, ByVal pReserved As IntPtr) As UInteger
WlanCloseHandle(handle, IntPtr.Zero);
WlanCloseHandle(handle, IntPtr.Zero) ole3215: StgOpenStorage
CloseStorageRoot(storageRoot);
private static void CloseStorageRoot(StorageInfo storageRoot)
InvokeStorageRootMethod(storageRoot, "Close"); quickusb16: Close 17: QuickUSB
Close();
Close(); 18: QuickUsbClose
private static extern int QuickUsbClose(IntPtr handle);
Declare Function QuickUsbClose Lib "quickusb.dll" (TODO) As TODO
int result = QuickUsbClose(handle); 19: QuickUsbReadData
Close();
Close();
Close(); urlmon21: FindMimeFromData
fs.Close();
fs.Close() advapi32
NativeMethods.CloseHandle(tokenHandle);
internal static extern Boolean CloseHandle(IntPtr hObject);
Private Function CloseHandle(ByVal hHandle As IntPtr) As Boolean
CloseHandle(hToken) 23: BackupEventLog
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); 26: ClearEventLog
// Ensure any open handle is closed.
NativeMethods.CloseEventLog(hEventLog); 27: CloseEventLog
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 29: ControlService
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); 31: CreateService
CloseServiceHandle(serviceHandle)
CloseHandle(scHandle) 32: 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); 35: 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) 40: 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) 42: LsaLookupSids
internal static extern int LsaClose(IntPtr PolicyHandle);
Win32Sec.LsaClose(lsaHandle); 43: 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); 46: OpenEventLog
CloseEventLog(logHandle); 47: OpenProcessToken The access token handle that is returned by TokenHandle should be closed using CloseHandle (kernel32) when you are finished using it. 48: OpenSCManager
CloseServiceHandle(scHandle)
CloseServiceHandle( handle ); 49: 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"); ; 50: 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. 51: RegEnumKeyEx
Throw New ApplicationException("Cannot access a closed registry key") 52: RegEnumValue
Throw New ApplicationException("Cannot access a closed registry key")
// The "Close()" will trigger RegNotifyChangeKeyValue if it is still listening
this._monitorKey.Close(); 54: 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. 55: RegOpenKeyEx
Throw New ApplicationException("Cannot access a closed registry key")
RegCloseKey(hKey); 56: RegQueryValue
'Don't forget to close the key ressource
environmentReg.Close()
RegCloseKey(hKey);
RegCloseKey(hKey); 57: RegQueryValueEx
'Don't forget to close the key ressource
environmentReg.Close()
RegCloseKey(hKey);
RegCloseKey(hKey); 58: RegSetValueEx Provided you specify true in the SafeRegistryHandle constructor, there is then no need to call RegCloseKey either.
RegCloseKey(hKey); 59: SaferCloseLevel
public static extern bool SaferCloseLevel(IntPtr hLevelHandle);
Declare Function SaferCloseLevel Lib "advapi32.dll" (ByVal hLevelHandle As Long) As Long 60: SaferCreateLevel Don't forget to close the handle using SaferCloseLevel. Cut off search results after 60. Please refine your search. |