[]
        
(Showing Draft Content)

C1.Util.DX.ComObject.As

As Method

As<T>(object)

Queries a managed object for a particular COM interface support (This method is a shortcut to QueryInterface(Guid, out IntPtr))

Declaration
public static T As<T>(object comObject) where T : ComObject
Parameters
Type Name Description
object comObject

The managed COM object.

Returns
Type Description
T

An instance of the queried interface

Type Parameters
Name Description
T

The type of the COM interface to query

As<T>(IntPtr)

Queries a managed object for a particular COM interface support (This method is a shortcut to QueryInterface(Guid, out IntPtr))

Declaration
public static T As<T>(IntPtr iunknownPtr) where T : ComObject
Parameters
Type Name Description
IntPtr iunknownPtr

The managed COM object.

Returns
Type Description
T

An instance of the queried interface

Type Parameters
Name Description
T

The type of the COM interface to query