GetConvertStg
Returns the
current value of the convert bit for the specified storage object.
WINOLEAPI GetConvertStg(
IStorage * pStg |
//Points
to the IStorage interface on the storage object |
); |
|
Parameter
pStg
[in] IStorage
pointer to the storage object from which the convert bit is to be retrieved.
Return Values
S_OK
Indicates the
convert bit is set to TRUE.
S_FALSE
Indicates the
convert bit is cleared (FALSE).
STG_E_ACCESSDENIED
Access denied
because the caller has insufficient permission, or another caller has the file
open and locked.
STG_E_LOCKVIOLATION
Access denied
because another caller has the file open and locked.
IStorage::OpenStream, IStorage::OpenStorage
Comments
The GetConvertStg
function is called by object servers that support the conversion of an object
from one format to another. The server must be able to read the storage object
using the format of its previous CLSID and write the object using the format of
its new CLSID to support the object s
conversion. For example, a spreadsheet created by one application can be
converted to the format used by a different application.
The convert
bit is set by a call to the SetConvertStg
Then, when
the object is activated, its server calls the GetConvertStg function to
retrieve the value of the convert bit from the storage object. If the bit is
set, the object s CLSID has been changed, and the server must read the
old format and write the new format for the storage object.
After
retrieving the bit value, the object application should clear the convert bit
by calling the SetConvertStg function with its fConvert parameter
set to FALSE.
See Also