Reputation: 1182
I'm trying to write a property handler for a file type our product creates I'm mostly there but the handler is failing to return any data via IPropertyStore::GetValue.
I can see via tracing/debugging that the Initialise method is being called and filling the store up with values.
But I can see that whenever GetValue is called although the key is being found in the store the variant has no data in it! if at that point I do something like:
InitPropVariantFromString(L"BLANK", pPropVar);
into the outval then it all works and BLANK will appear on the InfoTip.
Curiously if I write a test app that uses SHGetPropertyStoreFromParsingName and ask for the property I get the correct data back.
bit stumped really, anyone?
TIA
Upvotes: 2
Views: 530
Reputation: 1182
Fixed - my stupid.
I was defining my property keys incorrectly. Its appears that the whole property key union needs "filling"
like so
const PROPERTYKEY PK_TING={{0x96892702, 0xc272, 0x4792, 0xa2, 0x7, 0xdf, 0xe7, 0xd5, 0x60, 0xd6, 0xb8}, THE_PID};
is using both the guid and the pid of the PROPERTYKEY UNION.
sweetasanut.
Upvotes: 1