IInkDisp::Save
Windows Mobile SupportedWindows Embedded CE Not Supported
8/28/2008

Converts the IInkDisp object to the specified InkPersistenceFormat, saves the ink by using the specified InkPersistenceCompressionMode, and returns the binary data in an array of bytes.

Syntax


HRESULT Save (
  [in,optional, defaultvalue(IPF_InkSerializedFormat)]
    InkPersistenceFormat persistenceFormat,
  [in,optional, defaultvalue(IPCM_Default)]
    InkPersistenceCompressionMode compressionMode,
  [out, retval] VARIANT *Data
);
Parameters

persistenceFormat

[in] One of the InkPersistenceFormat values that indicates the format of the persisted ink.

compressionMode

[in] One of the InkPersistenceCompressionMode values, that specifies the compression mode of the persisted ink.

Data

[out, retval] Returns the byte array that contains the persisted ink.

For more information about the VARIANT structure, see Using the Automation Library with Windows Mobile Ink.

Return Value

S_OK

Success.

E_POINTER

A parameter contained an invalid pointer.

E_INK_EXCEPTION

An exception occurred inside the method.

E_INVALIDARG

Invalid compression mode.

E_OUTOFMEMORY

Cannot allocate byte array.

E_UNEXPECTED

Occurs if you attempt to save an empty Ink object in GIF format.

Remarks

Attempting to save an empty IInkDisp object in GIF format generates an error.

Note:
When calling the Save method with a InkPersistenceFormat value of Base64InkSerializedFormat, the return value is a NULL-terminated byte array. To write the saved ink to an XML file, first remove the last byte from the array before converting the array to 8-bit Unicode Transformation Format (UTF-8) encoded string.
Requirements

Headermsinkaut.h
Windows Embedded CEWindows CE 5.0 and later
Windows MobileWindows Mobile 6 Classic and later, Windows Mobile 6 Professional and later
See Also

Concepts

Windows Mobile Ink Reference

Tags :


Page view tracker