Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITfContextOwnerServices::Serialize method

The ITfContextOwnerServices::Serialize method obtains a property from a range of text and writes the property data into a stream object. This enables an application to store property data, for example, when writing the data to a file.

Syntax


HRESULT Serialize(
  [in]  ITfProperty                       *pProp,
  [in]  ITfRange                          *pRange,
  [out] TF_PERSISTENT_PROPERTY_HEADER_ACP *pHdr,
  [in]  IStream                           *pStream
);

Parameters

pProp [in]

Pointer to an ITfProperty interface that identifies the property to serialize.

pRange [in]

Pointer to an ITfRange interface that identifies the range that the property is obtained from.

pHdr [out]

Pointer to a TF_PERSISTENT_PROPERTY_HEADER_ACP structure that receives the header data for the property.

pStream [in]

Pointer to an IStream object that the TSF manager will write the property data to.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

S_FALSE

The property cannot be serialized.

E_FAIL

An unspecified error occurred.

 

Remarks

The property header data placed in pHdr is common to all properties and must be preserved with the data written into pStream. This same data pair must be passed to ITfContextOwnerServices::Unserialize to restore the property data.

An application can save all of the properties for the entire document by performing the following steps.

When calling this method, the application must be able to grant a synchronous read-only lock.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfContextOwnerServices
ITfProperty
ITfRange
TF_PERSISTENT_PROPERTY_HEADER_ACP

 

 

Show:
© 2016 Microsoft