User`s guide
C Registration and Versioning
C-2
Component Registration
When the MATLAB Excel Builder creates a component, it automatically
generates a binary file called a type library. As a final step of the build, this file
is bound with the resulting DLL as a resource.
Self-Registering Components
MATLAB Excel Builder components are all self-registering. A self-registering
component contains all the necessary code to add or remove a full description
of itself to or from the system registry. The
mwregsvr utility registers
self-registering DLLs. For example, to register a component called
mycomponent_1_0.dll, issue this command at the DOS command prompt.
mwregsvr mycomponent_1_0.dll
When mwregsvr completes the registration process, it displays a message
indicating success or failure. Similarly, the command
mwregsvr /u mycomponent_1_0.dll
unregisters the component.
An Excel Builder component installed onto a particular machine must be
registered with
mwregsvr. If you move a component into a different directory
on the same machine, you must repeat the registration process. When deleting
a component from a specific machine, first unregister it to ensure that the
registry does not retain erroneous information.
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.