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.
HRESULT Save (
[in,optional, defaultvalue(IPF_InkSerializedFormat)]
InkPersistenceFormat persistenceFormat,
[in,optional, defaultvalue(IPCM_Default)]
InkPersistenceCompressionMode compressionMode,
[out, retval] VARIANT *Data
);
- 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.
- 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.
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. |
| 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 |
Concepts
Windows Mobile Ink Reference