Solved

Using IHTMLElementCollection::item Method

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
c++ how to tell if the progra is ctl or mfc atl ect 6 63
thread-safe code in c++ 2 82
How to convert MFC::CString to UTF8 wchar_t* 10 137
Why isn't object file created? 6 39
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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.

947 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