Compartilhar via


Item Method [IInkExtendedProperties Interface]

Item Method [IInkExtendedProperties Interface]

Returns the IInkExtendedProperty object at the specified index within the IInkExtendedProperties collection.

Declaration

[C++]

HRESULT Item (
    [in] VARIANT identifier,
    [out, retval] IInkExtendedProperty** Item
);

[Microsoft® Visual Basic® 6.0]

Public Function Item( _
    identifier _
) As IInkExtendedProperty

Parameters

identifier

[in] The zero-based index or Guid of the IInkExtendedProperty object to get.

For more information about the VARIANT structure, see Using the Automation Library.

Item

[out] Returns the IInkExtendedProperty object at the specified index within the IInkExtendedProperties 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. However, the subtype of this variable must be integer or string (BSTR). This means that when you are using late binding, such as when you dimension a variable as type Object in Visual Basic 6.0 or when you use a scripting language, you must either dimension the argument variable as a String (Visual Basic 6.0) or pass in the argument as a String literal and not use a variable (script).

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 IInkExtendedProperty object from the ExtendedProperties property of an InkDispobject.

Dim theFirstProperty As IInkExtendedProperty
Set theFirstProperty = theInk.ExtendedProperties.Item(0)

Applies To