Board index » cppbuilder » TCppWebBrowser: How to access embedded ActiveX controls

TCppWebBrowser: How to access embedded ActiveX controls


2004-02-08 08:33:09 AM
cppbuilder7
Hi there,
I need access to data, wich is receveid by an ActiveX control (Flash).
I assume that I need control of the ActiveX itself to accomplish this,
right?
So I tried to retrieve its interface using IHTMLObjectElement like this:
TComInterface<IHTMLDocument2>doc;
pCppWebBrowser->Document->QueryInterface(IID_IHTMLDocument2, (LPVOID*)&doc);
if (doc) {
TComInterface<IHTMLObjectElement>object;
doc->QueryInterface(IID_IHTMLObjectElement, (LPVOID*)&object); // fails
with E_NOINTERFACE
if (object) {
// do data access
}
}
Can anyone give a hint?
Thanks in davance!
Klaus
 
 

Re:TCppWebBrowser: How to access embedded ActiveX controls

"Klaus G." < XXXX@XXXXX.COM >wrote in message
Quote
TComInterface<IHTMLObjectElement>object;
doc->QueryInterface(IID_IHTMLObjectElement, (LPVOID*)&object);
That is not the correct way to access the object. The object is not the
document itself, but you are trying to conde it that way. It is contained
inside the document instead, and as such you need to first locate the object
within the document's DOM, such as from its "all" or "embeds" collections,
before you can then query the object for its IHTMLObjectElement interface.
Even then, however, the IHTMLObjectElement interface will not gain you
access to the ActiveX control itself at all. It would, however, give you
the ActiveX control's CLSID and data file location, from which you can then
download the file separately and instantiate your own instance of the
ActiveX control to work with the downloaded file.
What exactly are you trying to accomplish?
Gambit
 

Re:TCppWebBrowser: How to access embedded ActiveX controls

Quote
What exactly are you trying to accomplish?
First I want to store all data passed to (an from) the IE.
The final goal is to compare and filter data from sessions
for differences, including transmissions of embedded
objects (like flash) to make notification about certain
changes possible.
Klaus
 

{smallsort}

Re:TCppWebBrowser: How to access embedded ActiveX controls

"Klaus G." < XXXX@XXXXX.COM >wrote in message
Quote
The final goal is to compare and filter data from sessions
for differences, including transmissions of embedded
objects (like flash) to make notification about certain
changes possible.
For embedded stuff, you would need to download the actual data files
separately. The DOM interfaces would gain you access to the filenames/urls,
but not the actual files. You would have to download those separately.
Gambit