Assigns a new CLSID to the current property storage object, and persistently stores the CLSID with the object.
HRESULT SetClass(
REFCLSID clsid //New CLSID for the property set
);
This method supports the standard return value E_UNEXPECTED, as well as the following:
Assigns a CLSID to the current property storage object. The CLSID has no relationship to the stored property identifiers. 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. Different CLSIDs can be associated with different property set instances that have the same FMTID.
If the property set is created with NULL specified as the IPropertySetStorage::Create pclsid parameter, 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 non-simple 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.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in objidl.h.
IPropertySetStorage::Create, IPropertyStorage::Stat