IPropertyStorage::SetClass method (propidl.h)
The SetClass method assigns a new CLSID to the current property storage object, and persistently stores the CLSID with the object.
HRESULT SetClass( REFCLSID clsid );
New CLSID to be associated with the property set.
This method supports the standard return value E_UNEXPECTED, in addition to the following:
Assigns a CLSID to the current property storage object. The CLSID has no relationship to the stored property IDs. Assigning a CLSID allows a piece of code to be associated with a given instance of a property set; such code, for example, might manage the user interface (UI). Different CLSIDs can be associated with different property set instances that have the same FMTID.
If the property set is created with the pclsid parameter of the IPropertySetStorage::Create method specified as NULL, the CLSID is set to all zeroes.
The current CLSID on a property storage object can be retrieved with a call to IPropertyStorage::Stat. The initial value for the CLSID can be specified at the time that the storage is created with a call to IPropertySetStorage::Create.
Setting the CLSID on a nonsimple property set (one that can legally contain storage- or stream-valued properties, as described in IPropertySetStorage::Create) also sets the CLSID on the underlying sub-storage.
|Minimum supported client||Windows 2000 Professional [desktop apps | UWP apps]|
|Minimum supported server||Windows 2000 Server [desktop apps | UWP apps]|
|Header||propidl.h (include Objbase.h, Propidlbase.h)|