Solved

Using IHTMLElementCollection::item Method

Posted on 2004-04-06
2
1,728 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

691 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