Marshal.GetComInterfaceForObject Method

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns an interface pointer that represents an interface for an object.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticGetComInterfaceForObject(Object, Type)

Returns a pointer to an IUnknown interface that represents the specified interface on the specified object. Custom query interface access is enabled by default.

System_CAPS_pubmethodSystem_CAPS_staticGetComInterfaceForObject(Object, Type, CustomQueryInterfaceMode)

Returns a pointer to an IUnknown interface that represents the specified interface on the specified object. Custom query interface access is controlled by the specified customization mode.

System_CAPS_pubmethodSystem_CAPS_staticGetComInterfaceForObject<T, TInterface>(T)

[Supported in the .NET Framework 4.5.1 and later versions]

Returns a pointer to an IUnknown interface that represents the specified interface on an object of the specified type. Custom query interface access is enabled by default.

Return to top
Show: