Registry
Here’s the big question. How do
we distinguish our band object as an Explorer band versus a
Communication band or a Desk band? We do this by assigning our
component to the Explorer Band component category. Component categories are used to group
functionality. For instance, when you create an ActiveX DLL component
in Visual Basic, a registry setting is added that specifies the
component to be in the category “Automation Objects.”
Verify this for yourself. Look up any of the CLSIDs for the
components we have created in this book under its
HKEY_CLASSES_ROOT\CLSID
entry. You will find a
subkey named Implemented
Categories
. Here you will find the following key:
{40FC6ED5-2438-11CF-A3DB-080036F12502}
Now, search for this key under the following key:
HKEY_CLASSES_ROOT\Component Categories
You will find that this CLSID represents a category called
“Automation Objects.” OLE View groups components by
category. Take a look. If you ever work on a project containing
several components that implement common interfaces, you might want
to create your own component category. It’s as simple as
creating a GUID with GUIDGEN.EXE
and adding it
to:
HKEY_CLASSES_ROOT\Component Categories
This mechanism allows the shell to quickly find the components it requires, in our case, Explorer Bands. Table 13.3 lists the CLSIDs for the three types of band objects.
Table 13-3. CLSIDs of Band Categories
Band Category |
CLSID |
---|---|
Desk Band |
{00021492-0000-0000-C000-000000000046} |
Explorer Band |
{00021493-0000-0000-C000-000000000046} ... |
Get VB Shell Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.