LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX and IWebBrowser2

Hi
I am trying to get HTML source as a string from Internet Explorer(5.5).
I do an Automation Open on SHDocVw.IWebBrowser2 and an Invoke Node to
open a URL as per examples from the NI site. Then I poll the ReadyState
Property to wait for the page to load.

It seems I then must get an address of a pointer using the Document
property which I have discovered is of type IDispatch. Apparently to
get the HTML source I need to call a QueryInterface for IHTMLDocument2
on this data. But that is where I've got stuck. Apparently
QueryInterface is part of SDK and I don't know where to get that or for
that matter how to call it. MS do a download for SDK for ActiveX 8 is
that what I need?
..
Any Windows programmers out there know how I can get and call this
f
unction?

(I know I can use Get HTTP Document.vi from Internet Toolkit but the
page I need to access will only load via IE.)

(LV6.02, WinMe)

Much appreciated.

Dave.
0 Kudos
Message 1 of 4
(5,303 Views)
I don't know exactly what type of content you are trying to read because if it is HTML source that you want to read, then you can use GetHTTPDocument.vi for that.
Also try using the Datasocket read to get the html source. attached image would explain how to use that VI. Again i'm not sure what type of content you are trying to read that would only load in IE.
Hope this helps
A Rafiq
0 Kudos
Message 2 of 4
(5,303 Views)
Thanks for your advice.
My problem is that the site I need to access uses some transparent authentication based on a pre registration sign up, (probably using cookies at the very least) so it won't serve the HTML to Get Http Document.
It is not as though I'm trying to hack the site, I am already authorised to get the data but I need to parse the HTML source within Labview. Both Netscape and IE can get past the authentication but ActiveX in IE seemed to be a good idea.
If I knew how to get Labview to do the authentication I would go that way so any pointers to serving up cookies would be appreciated!
Maybe I need to write a DLL to get the source but I'm not even sure which version of MSVC++ I would need to access QueryInterface. I could learn the C++ etc but
the reason I'm using Labview for this job is to get round having to learn VBA in Excel!
Umm...
0 Kudos
Message 3 of 4
(5,303 Views)
Hey there,

I am having the exact same problem. I need to access source code from HTMLs that are behind sign in pages. If I use the advice given to you, I merely get the login page HTML source. I am working hard on this problem. I notice that it has been some time since you asked. Any advice?

Thanks

Vincent
0 Kudos
Message 4 of 4
(5,303 Views)