MATLAB COM Builder    

Globally Unique Identifiers

Information is stored in the registry as keys with one or more associated named values. The keys themselves have values of primarily two types: readable strings and GUIDs. GUID is an acronym for Globally Unique Identifier, a 128-bit integer guaranteed always to be unique. The MATLAB Compiler automatically generates GUIDs for COM classes, interfaces, and type libraries that are defined within a component at build time, and codes these keys into the component's self-registration code. The interface to the system registry is directory based, and COM-related information is stored under a top-level key called HKEY_CLASSES_ROOT. Under HKEY_CLASSES_ROOT are several other keys under which the component writes its information. These keys are defined in Table C-1.

Table C-1: Keys 
Key
Definition
HKEY_CLASSES_ROOT\CLSID
Information about COM classes on the system. Each component creates a new key under HKEY_CLASSES_ROOT\CLSID for each of its COM classes. The key created has a value of the GUID that has been assigned the class and contains several subkeys with information about the class.
HKEY_CLASSES_ROOT\Interface
Information about COM interfaces on the system. Each component creates a new key under HKEY_CLASSES_ROOT\Interface for each interface it defines. This key has the value of the GUID assigned to the interface and contains subkeys with information about the interface.
HKEY_CLASSES_ROOT\TypeLib
Information about type libraries on the system. Each component creates a key for its type library with the value of the GUID assigned to it. Under this key a new key is created for each version of the type library. Therefore, new versions of type libraries with the same name reuse the original GUID but create a new subkey for the new version.
HKEY_CLASSES_ROOT\<ProgID>, HKEY_CLASSES_ROOT\<VerIndProgID>
These two keys are created for the component's Program ID and Version Independent Program ID. These keys are constructed from strings of the form <component-name>.<class-name> and <component-name>.<class-name><version-number>. These keys are useful for creating a class instance from the component and class names instead of the GUIDs.


  Self-Registering Components Versioning