According to the Remarks section for the IPropertyStorage::WriteMultiple Method...
When a new property set is created, the special codepage (Property ID 1) and Locale ID (Property ID 0x80000000) properties are written to the property set automatically.
However, I would like for my PropertySet to omit the LOCALE ID. I have tried
specs[0].ulKind = PRSPEC_PROPID;
specs[0].propid = PID_LOCALE;
//specs[0].lpwstr = 0;
hr = pPropStorage->DeleteMultiple(1, specs);
But this fails with
0x80030057 Invalid parameter error
How do I omit this unwanted Property ID? I have tried doing an IPropertyStorage::Commit()
before and after. But the same error is produced when calling DeleteMultiple()
.
NOTE: I had tried with and without specs[0].lpwstr = 0; but that was stupid because it is a "union" with propid, so writing them both changes the first. But it was still failing when setting only propid = PID_LOCALE.
Try putting the DeleteMultiple right after the Create.
User contributions licensed under CC BY-SA 3.0