RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ComObj.TClassInstancing Enumeration

UTClassInstancing determines how COM objects are instantiated.

Pascal
TClassInstancing = (
  ciInternal,
  ciSingleInstance,
  ciMultiInstance
);
C++
enum TClassInstancing {
  ciInternal,
  ciSingleInstance,
  ciMultiInstance
};

TClassInstancing indicates the process space in which a COM factory can instantiate COM objects and whether a single process can create more than one instance. The following table lists the possible values of the TClassInstancing type:

Value 
Meaning 
ciInternal  
The COM object is created by the same process as the COM server. That is, an external application cannot create an instance of this object directly. Instead, external processes must call a method of the application that creates the document object.  
ciSingleInstance  
Allows only a single instance of the COM object for each executable (application). If this single instance is not shared across multiple clients, then each client must launch its own instance of the executable.  
ciMultiInstance  
The COM object is created as one of multiple instances within the same executable. Any time a client requests service, a separate instance of the object gets invoked.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!