IHTMLControlRange::item Method

Retrieves an object from a controlRange collection.

Syntax


HRESULT item(
    long index,
    IHTMLElement **pdisp
);

Parameters

index
[in]  An long that specifies the zero-based index of the object to get.
pdisp
[out, retval] Ad pointer to the IHTMLElement interface that returns an element object if successful, otherwise NULL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Note   if given a string that is not a numeric index, this method will return the object at index 0.

This method returns S_OK, even if the element is not found. Check the value of the IDispatch pointer returned by this call. If the value of the pointer is NULL; the element was not found, and the call was not successful.

Community Additions

Show: