Indicates whether the object is to be automatically converted to a different CLSID. It does this by setting the conversion bit in a storage object. The setting can be retrieved with a call to the GetConvertStg function.

HRESULT SetConvertStg(

IStorage * pStg,
//Storage object where the conversion bit is to be set
BOOL fConvert
//Indicates whether an object is to be converted



Specifies the storage object in which to set the conversion bit.


If TRUE, sets the conversion bit for the object. If FALSE, clears the conversion bit.

Return Values


Indicates the object's conversion bit was set successfully.


Indicates access to the storage object is not available.


Indicates the conversion bit was not set due to a lack of memory.


Indicates one or more arguments are invalid.


Indicates an unexpected error occurred.

See the IStorage::CreateStream, IStorage::OpenStream, IStream::Read, and IStream::Write methods for possible storage and stream access errors.


As part of converting an object from one class to another, container applications call SetConvertStg to set the conversion bit in the storage object. The bit is set to TRUE, indicating that the object has been tagged for conversion to a new class the next time it is loaded.

To retrieve the value of the conversion bit, an object application calls the GetConvertStg function when it is loading the object. If the bit is set, the object application converts the object to the new CLSID. To reset an object's conversion bit, the object application calls the SetConvertStg function with the fConvert parameter set to FALSE.

See Also


Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database