WindowsRuntimeMarshal.GetActivationFactory(Type) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne un objet qui implémente l’interface de fabrique d’activation pour le type Windows Runtime spécifié.
Cette API prend en charge l'infrastructure du produit et n'est pas destinée à être utilisée directement à partir de votre 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
Paramètres
- type
- Type
Type Windows Runtime pour obtenir l’interface de fabrique d’activation.
Retours
Objet qui implémente l’interface de fabrique d’activation.
- Attributs
Exceptions
type ne représente pas un type Windows Runtime (c’est-à-dire, appartenant au Windows Runtime lui-même ou défini dans un composant Windows Runtime).
- ou -
L’objet spécifié pour type n’a pas été fourni par le système de type Common Language Runtime.
type a la valeur null.
La classe Windows Runtime spécifiée n’est pas correctement inscrite. Par exemple, le fichier .winmd a été localisé, mais le Windows Runtime n’a pas pu localiser l’implémentation.
Remarques
Outre les exceptions de la section Exceptions, tout HRESULT autre que S_OK celui retourné par la méthode de fabrique sous-jacente est marshalé comme exception.