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. |
Populates a new IInkDispobject with known binary data.
Syntax
HRESULT Load ( [in] VARIANT Stream ); |
Parameters
- Stream
-
[in] The stream that contains the ink data.
For more information about the VARIANT structure, see Using the Automation Library with Windows Mobile Ink.
Return Value
- S_OK
-
Success.
- E_INVALIDARG
-
VARIANT was not of correct type (byte array).
- E_OUTOFMEMORY
-
Cannot allocate memory for IStream.
- E_UNEXPECTED
-
Unexpected parameter or property type.
- E_INK_EXCEPTION
-
An exception occurred inside the method.
Remarks
You can load ink only into a new, empty IInkDispobject — one that hasn't collected any strokes or doesn't have any attached properties. If you try to load ink into an IInkDispobject that has collected strokes or attached properties, even if the strokes or properties have been deleted from the IInkDispobject, an exception is thrown. This occurs because of how stroke IDs are assigned. A stroke is assigned a unique ID, and this ID is not reused, even if the stroke has been deleted from an Ink object. This means that, if an IInkDispobject contained a stroke with an ID of 1 and you deleted the stroke and loaded another IInkDispobject into this IInkDispobject, stroke IDs would start at 2. This would be confusing and therefore is not allowed.
Note: |
---|
If you do attempt to load ink into an IInkDispobject that is not empty, all data in the IInkDispobject, including any custom strokes or extended properties, is lost when you call Load. |
The IInkDisp::Savemethod allows you to persist the ink in an IInkDispobject in Graphics Interchange Format (GIF) format, which consists of an array of byte data. After you have the array of byte data, you can load the array of byte data into another IInkDispobject. This means that you can load GIF–compatible byte array data into another IInkDispobject in the same way as if you had called the Savemethod and received a byte array that was not in GIF format.
Note: |
---|
You cannot create an image, persist that image as a byte array, and then load that byte array into another IInkDispobject. This is because, after you load byte array data as a GIF, Windows Mobile cannot control the format of that data. So, after you persist the image into a byte array again, you cannot call Loadon that data. |
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 |