Board index » cppbuilder » ActiveX Form and HTML

ActiveX Form and HTML


2004-02-27 02:35:50 AM
cppbuilder109
How do I access QueryString from an ActiveX Form?
 
 

Re:ActiveX Form and HTML

"Fernando Villa" < XXXX@XXXXX.COM >wrote in message
Quote
How do I access QueryString from an ActiveX Form?
"QueryString" implies the browser's URL. Is that what you are actually
looking for? Please be more specific.
Gambit
 

Re:ActiveX Form and HTML

Yes, the URL and the form elements.
 

{smallsort}

Re:ActiveX Form and HTML

"Fernando Villa" < XXXX@XXXXX.COM >wrote in message
Quote
Yes, the URL and the form elements.
From inside your control, you should be able to QueryInterface() the control
for an IOleObject interface.
From that, you can then call its GetClientSite() method to get an
IOleClientSite interface.
From that, you can then call its GetContainer() method to get an
IOLEContainer interface.
From that, you can then QueryInterface() it for the IServiceProvider
interface.
From that, you can then call its QueryService() method, using
IID_IWebBroserApp as the service ID, to get the browser's IWebBrowser2
interface.
From that, you have access to the browser's entire DOM. Refer to MSDN for
more information about the IWebBrowser2 and related interfaces.
Gambit
 

Re:ActiveX Form and HTML

I trying to follow your instructions. I need help with the first step.
HRESULT hr;
IClassFactory *cfobj=NULL;
IOleObject *ooobj=NULL;
CLSID clsid;
IOleClientSite *clientsite=NULL;
IOleContainer *container=NULL;
HRESULT h = CLSIDFromProgIDEx(OLESTR("InternetExplorer.Application.1"),&clsid);
//I tried QueryInterface and got the same error.
hr = CoGetClassObject(
sr, //CLSID associated with the class object
4, //Context for running executable code
NULL, //Must be NULL
IID_IOleObject, //Interface identifier
(void **)&ooobj);
The error is 'The object pointed to by ppv does not support the interface identified by riid.'.