SUMMARY
When you register ATL services that do not contain COM objects, you must use the Registry table in the Microsoft Windows Installer package. You cannot use the AppID table because it requires that corresponding entries in the Class table work properly. An ATL service that does not contain COM objects will not have entries in the Class Table because there is no CLSID.
back to the top
Sample Registry Table Entries
The following is an example of Registry table entries for an ATL service.
|
REG0 | 0 | AppID\{0F759B21-393A-47E1-BD7E-C2B921F45626} | * | (null) | C__4EE7908E3FA945FC87F3AE633A994B9D |
REG1 | 0 | AppID\{0F759B21-393A-47E1-BD7E-C2B921F45626} | ServiceParameters | -service | C__4EE7908E3FA945FC87F3AE633A994B9D |
REG2 | 0 | AppID\{0F759B21-393A-47E1-BD7E-C2B921F45626} | LocalService | servicetest | C__4EE7908E3FA945FC87F3AE633A994B9D |
In this example, C__4EE7908E3FA945FC87F3AE633A994B9D is an external key into the first column of the Component table referencing the component that contains the service. You must include the
LocalService key value for the ATL service in the
Name column. The name of the service goes in the
Value column. In this example, the name of the service is
servicetest. As in this example, your registry entries must contain the
ServiceParameters string in the
Name column. The corresponding
Value must be
-service.
Note that the AppID is a sample AppID. It will not be the same as the AppID for your service. To find the AppID for your service, check the registration information that is located in the
CServiceModule::RegisterServer() method of the ATL source code.
After you author these entries in the Registry table, you must also author the ServiceControl table and the ServiceInstall table to install and control the service.
back to the top