Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Converts the IInkDispobject 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 InkPersistenceFormatvalues that indicates the format of the persisted ink.
- compressionMode
-
[in] One of the InkPersistenceCompressionModevalues, 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 IInkDispobject in GIF format generates an error.
Note: |
---|
When calling the Savemethod with a InkPersistenceFormatvalue 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 |