FromHandle Method (handle, ownsHandle)

DTF API

Copy image CopyHover image
Deployment Tools Foundation FromHandle Method (handle, ownsHandle)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerSessionFromHandle(IntPtr, Boolean)
Creates a new Session object from an integer session handle.
Declaration Syntax
C# Visual Basic Visual C++ F#
public static Session FromHandle(
	IntPtr handle,
	bool ownsHandle
)
Public Shared Function FromHandle ( 
	handle As IntPtr,
	ownsHandle As Boolean
) As Session
public:
static Session^ FromHandle(
	IntPtr handle, 
	bool ownsHandle
)
static member FromHandle : 
        handle : IntPtr * 
        ownsHandle : bool -> Session 
Parameters
handle (IntPtr)
Integer session handle
ownsHandle (Boolean)
true to close the handle when this object is disposed or finalized
Return Value
Remarks

This method is only provided for interop purposes. A Session object should normally be obtained by calling OpenPackage(Database, Boolean) or OpenProduct(String).

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