API:System.Win.VCLCom.TComponentFactory.Create

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

constructor Create(ComServer: TComServerObject;  ComponentClass: TComponentClass; const ClassID: TGUID; Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);

C++

__fastcall TComponentFactory(System::Win::Comobj::TComServerObject* ComServer, System::Classes::TComponentClass ComponentClass, const GUID &ClassID, System::Win::Comobj::TClassInstancing Instancing, System::Win::Comobj::TThreadingModel ThreadingModel);

Propriétés

Type Visibilité  Source Unité  Parent
constructor public
System.Win.VCLCom.pas
System.Win.VCLCom.hpp
System.Win.VCLCom TComponentFactory

Description

Instancie un objet TAutoObjectFactory.

System.Win.VCLCom.TComponentFactory.Create hérite de System.Win.ComObj.TAutoObjectFactory.Create. Tout le contenu en-dessous de cette ligne se réfère à System.Win.ComObj.TAutoObjectFactory.Create.

Instancie un objet TAutoObjectFactory.

Create alloue de la mémoire pour un objet TAutoObjectFactory et appelle la méthode héritée Create, en lui transmettant les mêmes paramètres. Puis elle initialise les propriétés DispIntfEntry et DispTypeInfo, en déclenchant une exception EOleError s'il y a une erreur. La méthode Create initialise la propriété ErrorIID pour pointer sur DispIntfEntry.

Les fabricants de classe doivent être instanciés dans la section initialisation de l'unité contenant le code de la CoClasse qu'ils instancient. Les fabricants sont automatiquement disponibles quand le serveur est chargé.

Voir aussi