IInkDisp::Save

4/8/2010

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.

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

Header msinkaut.h
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later

See Also

Concepts

Windows Mobile Ink Reference