Skip to content

Latest commit

 

History

History
86 lines (70 loc) · 3.54 KB

nf-coml2api-getconvertstg.md

File metadata and controls

86 lines (70 loc) · 3.54 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:coml2api.GetConvertStg
GetConvertStg function (coml2api.h)
The GetConvertStg function returns the current value of the convert bit for the specified storage object.
GetConvertStg
GetConvertStg function [Structured Storage]
_stg_getconvertstg
coml2api/GetConvertStg
stg.getconvertstg
stg\getconvertstg.htm
Stg
748649a2-cf75-4ffa-ac1f-4a148b845d21
12/05/2018
GetConvertStg, GetConvertStg function [Structured Storage], _stg_getconvertstg, coml2api/GetConvertStg, stg.getconvertstg
coml2api.h
Ole2.h
Windows
Windows 2000 Professional [desktop apps \| UWP apps]
Windows 2000 Server [desktop apps \| UWP apps]
Ole32.lib
Ole32.dll
Windows
19H1
GetConvertStg
coml2api/GetConvertStg
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l2-1-1.dll
coml2.dll
GetConvertStg

GetConvertStg function

-description

The GetConvertStg function returns the current value of the convert bit for the specified storage object.

-parameters

-param pStg [in]

IStorage pointer to the storage object from which the convert bit is to be retrieved.

-returns

IStorage::OpenStream, IStorage::OpenStorage, and ISequentialStream::Read storage and stream access errors.

-remarks

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 class identifier (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 function. A container application can call this function on the request of an end user, or a setup program can call it when installing a new version of an application. An end user requests converting an object through the Convert To dialog box. When an object is converted, the new CLSID is permanently assigned to the object, so the object is subsequently associated with the new CLSID.

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

SetConvertStg