Solved

Using IHTMLElementCollection::item Method

Posted on 2004-04-06
2
1,606 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now