WindowsRuntimeMarshal.GetActivationFactory Method (Type)

.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.

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

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

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

<SecurityCriticalAttribute>
Public Shared Function GetActivationFactory (
	type As Type
) As IActivationFactory

Parameters

type
Type: System.Type

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

Return Value

Type: System.Runtime.InteropServices.WindowsRuntime.IActivationFactory

An object that implements the activation factory interface.

Exception Condition
ArgumentException

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.

ArgumentNullException

type is null.

TypeLoadException

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.

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.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: