Re: Loading HTML elements from memory
From: William Gray (wgray_at_wheresjamesnospam.com)
Date: 03/23/04
- Next message: Igor Tandetnik: "Re: Controlling keyboard input to browser control"
- Previous message: Igor Tandetnik: "Re: Keeping IE toolbar on its line - WM_SIZE message"
- In reply to: William Gray: "Re: Loading HTML elements from memory"
- Next in thread: Igor Tandetnik: "Re: Loading HTML elements from memory"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Mar 2004 19:09:54 -0500
Just thought I would post a followup.
I got the proxy working on the web control with the following code.
INTERNET_PROXY_INFO ipi;
ZeroMemory( &ipi, sizeof( ipi ) );
ipi.dwAccessType = INTERNET_OPEN_TYPE_PROXY;
ipi.lpszProxy = "http://127.0.0.1:18923";
ipi.lpszProxyBypass = NULL;
InternetSetOption( NULL, INTERNET_OPTION_PROXY, &ipi, sizeof( ipi ) );
I had to specify the INTERNET_OPEN_TYPE_DIRECT
flag in InternetOpen to actually download from web. For a moment
I had my proxy calling itself ad infinitum when it missed the database.
Would be nice to set the proxy on the control only, but I couldn't figure
it out.
I assume this wouldn't work for an Internet Explorer Active-X control,
as it may set the proxy settings for the browser as well, I'll have to try this
though.
Thanks Mark, and thanks to 'Igor Tandetnik' for his contributions.
His name makes good search fodder if your looking for more information
in this area.
Regards,
- Will
"William Gray" <wgray@wheresjamesnospam.com> wrote in message news:erZo9rBEEHA.3716@TK2MSFTNGP10.phx.gbl...
Thanks for the reply Mark,
The pages actually are in a database, along with the images.
Embedded images may point to a link such as
http://somewhere.com/foo.jpg . With the APP, I would
have to change the 'http:' to something like 'myapp:' One
problem is that some of the links are genereated using
javascript. javascript may fill an array with .../foo01.jpg,
.../foo02.jpg, etc. Given the full link, I can resolve it in
the database, but I have to wait for the control (web page)
to request the full link.
There are thousands of files in the database so manually
correcting the pages is out of the question and automatic
is not 100%.
I haven't quite implemented the proxy solution yet, but
am remaining hopeful. Still seems there should be a direct
way to intercept these requests and return the appropriate
data.
- Will
"Mark Finkle" <mark_finkle@nospam.hotmail.com> wrote in message news:uEeKXx7DEHA.3344@tk2msftngp13.phx.gbl...
If the proxy server would work, I don't see why an APP working as an HTTP
passthrough would not work. Essentially, you would intercept all HTTP
traffic, do whatever IMG stuff you need, and let the real HTTP protocol
handle the rest.
Mark Finkle
"William Gray" <wgray@wheresjamesnospam.com> wrote in message
news:#7xi0E7DEHA.4080@TK2MSFTNGP09.phx.gbl...
> After banging my head on the keyboard a few hours,
> I figured out that I could get the result I need by pointing
> my control at a custom proxy server. Still would be
> interesting to know if there is a more direct way.
>
> I also understand how to write an APP, but this would
> require me to change the links on the page which I don't
> want to do and can't always do since they may be created
> by javascript.
>
- Next message: Igor Tandetnik: "Re: Controlling keyboard input to browser control"
- Previous message: Igor Tandetnik: "Re: Keeping IE toolbar on its line - WM_SIZE message"
- In reply to: William Gray: "Re: Loading HTML elements from memory"
- Next in thread: Igor Tandetnik: "Re: Loading HTML elements from memory"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|