Can TRegistry write REG_NONE values?

I am trying to work with the OpenWithProgids key of an extension using TRegistry. I don’t see that TRegistry can write these values ​​(which require the REG_NONE type.) I know that I could just use the RegSetValueEx API function to set them, but I wonder if there is anything missing in TRegistry that I can do this.

+5
source share
1 answer

It is true that TRegistryit has no direct support for values REG_NONE. However, with a secure hack, you can trick it into creating REG_NONEzero-length binary values :

type
  TRegistryHack = class(TRegistry);
....
TRegistryHack(Registry).PutData(ValueName, nil, 0, rdUnknown);

, PutData, . , TRegistry, .

+4

All Articles