Item Method [IInkCustomStrokes Interface]
Item Method [IInkCustomStrokes Interface] |
Returns the InkStrokes collection at the specified index within the IInkCustomStrokes collection.
Declaration
[C++]
HRESULT Item (
[in] VARIANT identifier,
[out, retval] IInkStrokes** Strokes
);
[Microsoft® Visual Basic® 6.0]
Public Function Item( _
identifierAs Variant_
) As InkStrokes
Parameters
identifier
[in] The zero-based index or string name of the InkStrokes collection to get.
For more information about the VARIANT structure, see Using the Automation Library.
Strokes
[out] Returns the InkStrokes collection at the specified index or name within the IInkCustomStrokes collection.
Return Value
HRESULT value | Description |
---|---|
S_OK | Success. |
E_POINTER | A parameter contained an invalid pointer. |
E_FAIL | An unspecified error occurred. |
CO_E_CLASSTRING | Invalid GUID format. |
DISP_E_TYPEMISMATCH | One of the parameters is not a valid VARIANT type. |
E_INVALIDARG | Invalid argument. |
E_UNEXPECTED | Unexpected parameter or property type. |
REGDB_CLASSNOTREG | Type object not registered. |
E_OUTOFMEMORY | Cannot allocate memory to complete the operation. |
E_INK_EXCEPTION | An exception occurred inside the method. |
TPC_E_RECOGNIZER_NOT_REGISTERED | The recognizers registry key is corrupted. |
Remarks
An error occurs if the index doesn't match any existing member of the collection.
The Item method takes an input argument of type Variant. The subtype of this variable must be BSTR or Long.
For more information about the VARIANT and BSTR data types, see Using the Automation Library.
Example
[Visual Basic 6.0]
This Visual Basic 6.0 example gets the first InkStrokes from the CustomStrokes property of an InkDisp object.
[C++]Dim theFirstStrokes Astrokes
Set theFirstStrokes = theInk.CustomStrokes.Item(0)