[]
        
(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)
Public Overridable Function QueryInterfaceOrNull(guid As Guid) As IntPtr
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
Public Shared Function QueryInterfaceOrNull(Of T As ComObject)(comPointer As IntPtr) As T
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
Public Overridable Function QueryInterfaceOrNull(Of T As ComObject)() As T
Returns
Type Description
T

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

Type Parameters
Name Description
T