Discussion:
Get PROPERTYKEY from Name
(too old to reply)
unknown
2009-10-11 20:24:57 UTC
Permalink
Hi! How i can convert a Property name to a PROPERTYKEY structure (FMTID/PID) by the name?

Example:
From Registry i take: HKEY_CLASSES_ROOT\*\InfoTip

than in my case, the result is: "propocTitle;Type;Size;FileVersion;FileTitle;ProgramDescription"

I have written a function to get sequentially property by property... so i have:
DocTitle
Type
Size
FileVersion
FileTitle
ProgramDescription

I want to translate the correspondent PROPERTYKEY structure (FMTID/PID) or otherwise translate this string to the correspondent replacement as Windows Explorer do.

Any suggestion is appreciated. Thanks in advance!

EggHeadCafe - Software Developer Portal of Choice
VB.NET TCP Client - Server Socket Communications
http://www.eggheadcafe.com/tutorials/aspnet/3dbc2e09-729c-4dff-b0cf-3619c1576dca/vbnet-tcp-client--serve.aspx
Jim Barry
2009-10-12 17:35:23 UTC
Permalink
Post by unknown
Hi! How i can convert a Property name to a PROPERTYKEY structure (FMTID/PID) by the name?
You can create a CLSID_PropertiesUI object and call its
IPropertyUI::ParsePropertyName method.

- Jim
unknown
2009-10-13 11:51:38 UTC
Permalink
Yes, i have resolved myself, in windows vista don't work.. but i have user the "propsys.dll" module and "PSGetPropertyKeyFromName" method for make it work :)

Thanks anyway :)



Jim Barry wrote:

Emulator Emu wrote:You can create a CLSID_PropertiesUI object and call
12-ott-09

Emulator Emu wrote:

You can create a CLSID_PropertiesUI object and call its
IPropertyUI::ParsePropertyName method.

- Jim

EggHeadCafe - Software Developer Portal of Choice
Register COM Components Remotely with ASP
http://www.eggheadcafe.com/tutorials/aspnet/5ab83dbc-e116-43c3-b7dd-68dbca3ab2ca/register-com-components-r.aspx
Jim Barry
2009-10-13 17:44:47 UTC
Permalink
Post by unknown
Yes, i have resolved myself, in windows vista don't work.. but i have user the "propsys.dll" module and "PSGetPropertyKeyFromName" method for make it work :)
You are right, Vista is buggy... its ParsePropertyName implementation
calls through to PSPropertyKeyFromString instead of
PSGetPropertyKeyFromName, so it fails to recognise anything other than
the "{fmtid} pid" format :(

- Jim

Continue reading on narkive:
Search results for 'Get PROPERTYKEY from Name' (Questions and Answers)
3
replies
Possibly honeymooning at the Grand Canyon. Tips?
started 2008-10-02 11:42:31 UTC
weddings
Loading...