ITextStoreACPServices::Serialize method (msctf.h)
Obtains a property from a range of text and writes the property data into a stream object.
HRESULT Serialize( [in] ITfProperty *pProp, [in] ITfRange *pRange, [out] TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr, [in] IStream *pStream );
Pointer to an ITfProperty interface that identifies the property to serialize.
Pointer to an ITfRange interface that identifies the range that the property is obtained from.
Pointer to a TF_PERSISTENT_PROPERTY_HEADER_ACP structure that receives the header data for the property.
Pointer to an IStream object that the TSF manager will write the property data to.
This method can return one of these values.
||The method was successful.|
||The property cannot be serialized.|
||An unspecified error occurred.|
The property header data placed in pHdr is generic to all properties and must be preserved with the data written into pStream. This same data pair must be passed to ITextStoreACPServices::Unserialize to restore the property data.
An application can save all of the properties for the entire document by performing the following steps.
- Enumerate all properties using ITfContext::EnumProperties.
- Within each property, enumerate the ranges using ITfReadOnlyProperty::EnumRanges.
- Pass the current property and range to ITextStoreACPServices::Serialize.
- Write the data placed in pHdr to the file.
- Write the data added to pStream to the file.
|Minimum supported client||Windows 2000 Professional [desktop apps | UWP apps]|
|Minimum supported server||Windows 2000 Server [desktop apps | UWP apps]|
|Redistributable||TSF 1.0 on Windows 2000 Professional|
ITextStoreACPServices interface, ITextStoreACPServices::Unserialize, ITfContext::EnumProperties, ITfProperty interface, ITfRange interface, ITfReadOnlyProperty::EnumRanges, TF_PERSISTENT_PROPERTY_HEADER_ACP structure