From: R.Wieser on
Hello all,

I've got a small app here in which one of the functions returns a GUID. I
display that GUID, but would like to translate that identifier to something
more readable.

Somehow I do not seem to be able too. The ProgIDFromCLSID function refuses
to accept a GUID (throws an 80040154 (hex) error), and using "brute force"
by simply looking in the registry does not quite work either.

For instance, I would like the GUID {20D04FE0-3AEA-1069-A2D808002B30309D} to
show "This computer" (or similar). But somehow that kind of information
seems not to be readily available.

I could use a suggestion ...

Regards,
Rudy Wieser



From: Jaelani on
R.Wieser wrote:
> Hello all,
>
> I've got a small app here in which one of the functions returns a GUID. I
> display that GUID, but would like to translate that identifier to something
> more readable.
>
> Somehow I do not seem to be able too. The ProgIDFromCLSID function refuses
> to accept a GUID (throws an 80040154 (hex) error), and using "brute force"
> by simply looking in the registry does not quite work either.
>
> For instance, I would like the GUID {20D04FE0-3AEA-1069-A2D808002B30309D} to
> show "This computer" (or similar). But somehow that kind of information
> seems not to be readily available.
>
> I could use a suggestion ...
>
> Regards,
> Rudy Wieser

A "Class not registered" (0x80040154) error means that the GUID is not
found in the registry - in the HKEY_CLASSES_ROOT\CLSID key to be exact.
The GUID may be an interface ID or a type library ID instead of a class ID.

Almost half of all classes and interfaces on a clean Windows
installation don't specify their name in the registry. Some (but not
all) classes and interfaces have a type library which defines (and
describes) them. So for some, are impossible to know what they are
except the DLL/EXE file name.

You might want to take a look at the OLE/COM Object Viewer (oleview.exe)
tool included in the Windows SDK (older SDK, I think). It's the most
thorough OLE explorer I know.
From: R.Wieser on
Hello Jaelani,

> A "Class not registered" (0x80040154) error means that the GUID
> is not found in the registry - in the HKEY_CLASSES_ROOT\CLSID
> key to be exact.

Yep, thats exactly where I looked for and found that "This computer" GUID.
Alas, extracting the desired info from there is mor of a hit-and-miss kind
of thing . Providing ProgIDFromCLSID with that same GUID did not turn up
anything though (figures, as its not an executable).

> So for some, are impossible to know what they are except the
> DLL/EXE file name.

If all others do return info and the rest "just" the filename I would have
more than I have now.

I did create a simple look-up table (using an INI-file. Easy to edit and
without having to recreate the executable), but that only works for the
GUIDs I either allready know or encounter while testing.

> You might want to take a look at the OLE/COM Object Viewer (oleview.exe)
> tool included in the Windows SDK (older SDK, I think). It's the most
> thorough OLE explorer I know.

:-) I was aiming for letting the OS do all the work, and me just
displaying the result.

Thanks for the response though.

Rudy Wieser

-- Origional message
Jaelani <jaejunks(a)googlemail.com> schreef in berichtnieuws
i2iv6m$r0$1(a)news.eternal-september.org...
> R.Wieser wrote:
> > Hello all,
> >
> > I've got a small app here in which one of the functions returns a
GUID. I
> > display that GUID, but would like to translate that identifier to
something
> > more readable.
> >
> > Somehow I do not seem to be able too. The ProgIDFromCLSID function
refuses
> > to accept a GUID (throws an 80040154 (hex) error), and using "brute
force"
> > by simply looking in the registry does not quite work either.
> >
> > For instance, I would like the GUID
{20D04FE0-3AEA-1069-A2D808002B30309D} to
> > show "This computer" (or similar). But somehow that kind of information
> > seems not to be readily available.
> >
> > I could use a suggestion ...
> >
> > Regards,
> > Rudy Wieser
>
> A "Class not registered" (0x80040154) error means that the GUID is not
> found in the registry - in the HKEY_CLASSES_ROOT\CLSID key to be exact.
> The GUID may be an interface ID or a type library ID instead of a class
ID.
>
> Almost half of all classes and interfaces on a clean Windows
> installation don't specify their name in the registry. Some (but not
> all) classes and interfaces have a type library which defines (and
> describes) them. So for some, are impossible to know what they are
> except the DLL/EXE file name.
>
> You might want to take a look at the OLE/COM Object Viewer (oleview.exe)
> tool included in the Windows SDK (older SDK, I think). It's the most
> thorough OLE explorer I know.



From: Dee Earley on
On 23/07/2010 19:10, R.Wieser wrote:
> Hello all,
>
> I've got a small app here in which one of the functions returns a GUID. I
> display that GUID, but would like to translate that identifier to something
> more readable.

The GUID could refer to absolutely anything.
Depending on where you got it from, you may need to check different
places to get a display name.

If i gave you "{80367FD9-6162-4A1F-9C88-1157E01D5B3A}", you'd have no
idea what it means, but with the correct context (the security cameras
in our office) you can determine its name to be "Axis 215 PTZ"

If it's a COM guid then a relatively easy (3-4 lines of code) lookup can
be used assuming you know what type of COM GUID it is.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)
From: R.Wieser on
Hello Dee,

> Depending on where you got it from, you may need to
> check different places to get a display name.

True. But as long as I can get a usable name for all the GUIDs that are
present/active on my computer I would be more than happy.

Currently I cannot even determine what *kind* of GUID I've got (COM/ActiveX
object, Special folder/object, other), let alone a description to it.

> If it's a COM guid then a relatively easy (3-4 lines of code) lookup can
> be used assuming you know what type of COM GUID it is.

I cannot assume anything about the GUID. Not even if its a COM/ActiveX
guid.. I was hoping I could retrieve such info from the OS itself .

And I allready made, with the current absense of another method, such a
look-up. Lets hope nobody creates a new GUID for their programe/COM/ActiveX
object though, otherwise that table-lookup method will not know those new
GUIDs and still fail ... :-p

Regards,
Rudy Wieser

P.s.
That guid you supplied does not even turn up on Google (yeah, I checked), so
its anybodies guess what it might be for.


-- Origional message:
Dee Earley <dee.earley(a)icode.co.uk> schreef in berichtnieuws
i2m2r0$m2i$1(a)speranza.aioe.org...
> On 23/07/2010 19:10, R.Wieser wrote:
> > Hello all,
> >
> > I've got a small app here in which one of the functions returns a
GUID. I
> > display that GUID, but would like to translate that identifier to
something
> > more readable.
>
> The GUID could refer to absolutely anything.
> Depending on where you got it from, you may need to check different
> places to get a display name.
>
> If i gave you "{80367FD9-6162-4A1F-9C88-1157E01D5B3A}", you'd have no
> idea what it means, but with the correct context (the security cameras
> in our office) you can determine its name to be "Axis 215 PTZ"
>
> If it's a COM guid then a relatively easy (3-4 lines of code) lookup can
> be used assuming you know what type of COM GUID it is.
>
> --
> Dee Earley (dee.earley(a)icode.co.uk)
> i-Catcher Development Team
>
> iCode Systems
>
> (Replies direct to my email address will be ignored.
> Please reply to the group.)