[]
        
(Showing Draft Content)

C1.Util.DX.ComObject.QueryInterfaceOrNull

QueryInterfaceOrNull Method

QueryInterfaceOrNull(Guid)

Query instance for a particular COM GUID/interface support.

Declaration
public virtual IntPtr QueryInterfaceOrNull(Guid guid)
Parameters
Type Name Description
Guid guid

GUID query interface

Returns
Type Description
IntPtr

QueryInterfaceOrNull<T>(IntPtr)

Queries a managed object for a particular COM interface support.

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

A pointer to a 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

QueryInterfaceOrNull<T>()

Query Interface for a particular interface support.

Declaration
public virtual T QueryInterfaceOrNull<T>() where T : ComObject
Returns
Type Description
T

An instance of the queried interface or null if it is not supported

Type Parameters
Name Description
T