COM uses the idea of an apartment thread to describe a thread which handles access to its contained COM components. This is exactly what the Carapace Apartment object does -- it is a thread which supports a set of classes declared in a given type library.
An Apartment is created by using the
create function eg.
(create Apartment)
At this point, the apartment thread does not know what COM classes to support.
These are installed using the loadTypeLibrary
method.
| method name | description |
|---|---|
loadTypeLibrary |
load the type library and offer its classes to COM |
loadTypeLibraryLoad the type library having the supplied GUID and offer its classes to COM. COM can then use this apartment thread to create COM servers for the types contained in the type library.
NOTE:
Arguments:
| typeLibGuid | String |
| registrationContext | Integer |
The registrationContext is formed by adding the following integers together:
| inproc server | 1 |
| inproc handler | 2 |
| local server | 4 |
| remote server | 16 |
Return type: the empty List is returned
| Contents | Index | Current topic: COM | Related Links: COM helpers, objects, built-in objects |