| Reference information | |
|---|---|
| Project page | COM Classes and Typelibs |
| Related topics | Working with attribute panes |
A COM Server object represents a COM server registration or unregistration. It is used to specify the executable file (DLL or .exe) that contains the server implementation for a COM class.
Registration or unregistration of a COM server is controlled by its component and its executable file. The details differ somewhat between Tarma Installer and Windows Installer.
| Situation | Tarma Installer | Windows Installer |
|---|---|---|
| Not linked to a component | The COM server is registered if its executable file is installed. |
The COM server is registered if its executable file is installed and is controlled by that file's component. The executable file must be the key path of the component. If the COM server has its own component, it is ignored (however, Tarma ExpertInstall will issue a BLD:U0037 diagnostic message if the COM server's component is different from the executable file's component). |
| Linked to a component | The COM server is registered if its component is installed. |
See COM Classes and Typelibs for more information.
Tip: Many DLL-based COM servers have a DllRegisterServer entry point that will register the COM class(es) implemented by the server. If your COM server implements that entry point, you might find it more convenient to register the COM server by specifying Use DllRegisterServer in the file's Registration attribute. In that case, you don't need to register the COM class or its servers and verbs separately.
This pane contains the following attributes and options.
| Attribute | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Context |
Select the server's execution context from the drop-down list. The following choices are available:
|
||||||||||||||
| Threading model |
Select the threading model for the in-process server from the drop-down list. This option only applies if Context is set to InProcServer32. The following choices are available:
|
||||||||||||||
| Server path |
Enter the path to the COM server, or click ... (browse) to open the Select Installation File or Folder dialog box that allows you to browse for the desired file. |
||||||||||||||
| Arguments |
Enter the command line arguments for the server executable, or leave empty if no command line arguments are required. This option only applies if Context is set to LocalServer or LocalServer32. |
||||||||||||||
| Relative server path |
Check this box to register Server path as a file name only; clear it to register it as a full path (if indeed it contains a full path). By registering only the server name (instead of the full path), an application-relative server can be registered for a given COM class and different applications can use different servers for the same class. Ron's note: This is probably a Bad Idea. At the very least, it will be a maintenance and debugging nightmare; at the worst, it opens a security hole because it makes it very easy to replace a COM server by a malicious one, in particular because most applications (and therefore most application-relative COM servers) are stored under Program Files, where security tends to be laxer than under Windows\System32, where COM servers usually live. |