SetConvertStg

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
);

Parameters

pStg

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

fConvert

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

Return Values

S_OK

Indicates the object's conversion bit was set successfully.

STG_E_ACCESSDENIED

Indicates access to the storage object is not available.

E_OUTOFMEMORY

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

E_INVALIDARG

Indicates one or more arguments are invalid.

E_UNEXPECTED

Indicates an unexpected error occurred.

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

Comments

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

GetConvertStg

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