Common Registry entries for COM/COM+ classes
COM clients do not register COM DLLs. You have to do it manually using a utility called regsvr32.exe or some Windows Setup.EXE program performs the registration behind the scenes. The following Registry settings from Gregory Brill's Applying COM+, New Riders, are the minimum entries a DLL enters.
Following is a list (which by no means is all-inclusive) of common Registry settings. Note that most are optional:
- Implemented Categories (Optional). Clients and utilities can look at this entry to determine what a given coclass is capable of and/or what its requirements are. Specifically, there are a number of GUID's established by Microsoft (check MSDN for details), each one of which indicates a specific capability or requirement. One or many of these GUIDS can be added as subkeys under this key.
- InprocServer32 (Required). Contains the path and DLL where the coclass being described can be found. Also has a data entry indicating the coclass's threading affinity.
- Programmable (Optional). Indicates that the object supports OLE automation.
- Typelib (Suggested but optional). Lists the GUID of its type library. This GUID can be looked up under the HKEY_CLASSES_ROOTTypeLib key, and the actual path to the type library can then be found.
- Version (Optional). Can be used to indicate a version of the coclass. This is only important if different versions of the same coclass co-exist, but all need to be available to the client.