Close Method

Microsoft Deployment Compression & Installer

Copy image CopyHover image
Deployment Tools Foundation Close Method
Closes the handle. After closing a handle, further method calls may throw an InvalidHandleException.
Declaration Syntax
C# Visual Basic Visual C++
public void Close()
Public Sub Close
public:
void Close()
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.9.1006.0)