mayayana
Wed Dec 28 17:33:07 CST 2005
> Is there a way that I can obtain a list of objects that are available to
me
> from my workstation?
>
If you want softwaree that can show you a list of all
potentially usable objects:
http://www.jsware.net/jsware/webed.html
If you want to create a list programmatically then
you need to use some means of being able to
enumerate Registry keys. The whole structure
of COM implies that objects are documented
in the Registry. Anything that can be created can
be tracked down there. (Otherwise Windows
wouldn't know how to create it.)
1) Read all keys under HKCR\CLSID and
check for any that have a subkey named
"InProcServer32" or "LocalServer32".
The former is used by ActiveX DLLs and
controls. The latter is used by ActiveX EXEs.
The default value under that key is the path
of the file containing the object.
If there is a ProgID subkey or
VersionIndependentProgID subkey that will
tell you the ProgID. (The one under the ProgID
key may be somethoing like "server.class.3"
while the version independent progid is without
the version number.)
If it has a ProgID you may be able to use the
object in script via CreateObject.
2) You can also work the other way, by going through
the HKCR keys - leaving out the filetype keys - and
look for any that have a CLSID subkey. Then look up
the CLSID in HKCR\CLSID. The advantage of that
approach is that you'll be filtering actual ProgIDs and
won't return any objects that don't have a ProgID.
In other words, HKCR subkeys list all registered
ProgIDs and provide a CLSID subkey to track them
down, while HKCR\CLSID subkeys work in reverse,
listing all CLSIDs with ProgID info. (if any) in the
subkeys.
Either way, if you can use it in script with CreateObject
then it has to have a ProgID and CLSID in the Registry.