Solved

Using IHTMLElementCollection::item Method

Posted on 2004-04-06
2
1,652 Views
Last Modified: 2008-01-16
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???
0
Comment
Question by:stminfo
2 Comments
 
LVL 9

Accepted Solution

by:
_ys_ earned 500 total points
ID: 10777754
0
 

Expert Comment

by:drjasonharrison
ID: 25202729
The URL is now broken.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ get user from AD  (VS6) 7 73
Getting IP address 8 79
basic hardware to learn oop advanced design patterns 3 95
Beginner to Unreal Engine 4 5 80
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question