stminfo
asked on
Using IHTMLElementCollection::item Method
In Windows using Visual C++ version 6, I am using the item method of IHTMLElementCollection to get a certain item with a given id or name in an HTML document. There may be zero, one, or more of these items in the document. The documentation of this method states:
HRESULT item(
VARIANT name,
VARIANT index,
IDispatch **pdisp
);
where
pdisp is [out, retval] Address of a pointer that receives an IDispatch interface for the object or collection if successful, or NULL otherwise.
I have been able to use this pdisp pointer to get the first of the items but I don’t know how to get the second or third, etc. I assume that these are part of a collection but I don’t know how to get access to that collection. Nothing I have tried works. Any ideas? Any sample code showing this???
HRESULT item(
VARIANT name,
VARIANT index,
IDispatch **pdisp
);
where
pdisp is [out, retval] Address of a pointer that receives an IDispatch interface for the object or collection if successful, or NULL otherwise.
I have been able to use this pdisp pointer to get the first of the items but I don’t know how to get the second or third, etc. I assume that these are part of a collection but I don’t know how to get access to that collection. Nothing I have tried works. Any ideas? Any sample code showing this???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The URL is now broken.