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. |
Creates and adds an IInkExtendedPropertyobject to the IInkExtendedPropertiescollection.
Syntax
HRESULT Add ( [in] BSTR Guid, [in] VARIANT data, [out, retval] IInkExtendedProperty ** InkExtendedProperty ); |
Parameters
- Guid
-
Specifies the name of the new IInkExtendedPropertyobject. The name is expressed as a BSTRthat represents the globally unique identifier ( GUID) in the following format:
{dfc71f44-354b-4ca1-93d7-7459410b6343} (Including curly braces)
For more information about the BSTR data type, see Using the Automation Library with Windows Mobile Ink.
- Data
-
Specifies the data for the new IInkExtendedPropertyobject.
For more information about the VARIANT structure, see Using the Automation Library with Windows Mobile Ink.
- InkExtendedProperty
-
Returns the new extended property.
Return Value
HRESULT value | Description |
---|---|
S_OK |
Success. |
E_POINTER |
A parameter contained an invalid pointer. |
E_INVALIDARG |
The user did not specify data. |
CO_E_CLASSSTRING |
Invalid GUID format. |
E_INK_EXCEPTION |
An exception occurred inside the method. |
TPC_E_INVALID_STROKE |
The stroke is invalid. |
Remarks
You cannot store an empty IInkExtendedPropertyobject. The object must contain data before it can be stored. For example, if you try to add extended properties to a stroke for later use, an exception is thrown if the extended property contains no data.
The following types are acceptable:
- Byte or CHAR array
- Arrays of integers, floats, large integers, doubles, dates, or
decimals
- Booleans (but not arrays of Booleans)
- BSTRs (but not arrays of BSTRs)
- Arrays of Variants. All arrays of variants passed as an
IInkExtendedPropertymust be of the same type and be all
numeric. For example, variant arrays of BSTRS, arrays of arrays,
VT_NULL and VT_EMPTY are not supported.
Note: |
---|
If you call this method with the Guidparameter set to a GUID that already exists in the IInkExtendedPropertiescollection, the new data will replace the existing extended property for that GUID instead of adding a second element. |
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 |