Close Method

DTF API

Copy image CopyHover image
Deployment Tools Foundation Close Method
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerHandleClose()()()()
Closes the handle. After closing a handle, further method calls may throw an InvalidHandleException.
Declaration Syntax
C# Visual Basic Visual C++ F#
public void Close()
Public Sub Close
public:
void Close()
member Close : unit -> unit 
Remarks

The finalizer of this class will NOT close the handle if it is still open, because finalization can run on a separate thread from the application, resulting in potential problems if handles are closed from that thread. It is best that the handle be closed manually as soon as it is no longer needed, as leaving lots of unused handles open can degrade performance.

This method is merely an alias for the Dispose()()()() method.

Win32 MSI API: MsiCloseHandle

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)