Edit

Share via


WindowsRuntimeMarshal.GetActivationFactory(Type) Method

Definition

Returns an object that implements the activation factory interface for the specified Windows Runtime type.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 static System::Runtime::InteropServices::WindowsRuntime::IActivationFactory ^ GetActivationFactory(Type ^ type);
[System.Security.SecurityCritical]
public static System.Runtime.InteropServices.WindowsRuntime.IActivationFactory GetActivationFactory (Type type);
public static System.Runtime.InteropServices.WindowsRuntime.IActivationFactory GetActivationFactory (Type type);
[<System.Security.SecurityCritical>]
static member GetActivationFactory : Type -> System.Runtime.InteropServices.WindowsRuntime.IActivationFactory
static member GetActivationFactory : Type -> System.Runtime.InteropServices.WindowsRuntime.IActivationFactory
Public Shared Function GetActivationFactory (type As Type) As IActivationFactory

Parameters

type
Type

The Windows Runtime type to get the activation factory interface for.

Returns

An object that implements the activation factory interface.

Attributes

Exceptions

type does not represent a Windows Runtime type (that is, belonging to the Windows Runtime itself or defined in a Windows Runtime component).

-or-

The object specified for type was not provided by the common language runtime type system.

type is null.

The specified Windows Runtime class is not properly registered. For example, the .winmd file was located, but the Windows Runtime failed to locate the implementation.

Remarks

In addition to the exceptions in the Exceptions section, any HRESULT other than S_OK that is returned by the underlying factory method will be marshaled as an exception.

Applies to