COM::createFromInterface Method

Creates an instance of the COM class by using the specified COM interface.


client server public static COM createFromInterface(ComInterface interface)

Run On



Return Value

Type: COM Class
An instance of the COM class for the COM interface that is specified by the interface parameter; nullNothingnullptrunita null reference (Nothing in Visual Basic) if the instance of the COM class could not be created.


To help reduce security risks that are associated with unmanaged code, make sure that you validate the objects that are passed to this method, and that all DLLs used for your COM objects are protected by access control lists.

See Also

COM Class

COM::createFromObject Method

COM::createFromVariant Method