Article View: borland.public.cppbuilder.internet.web
Article #279WinHTTP and Threads
From: Eduardo Jauch
Date: Sun, 11 Feb 2007 17:22
Date: Sun, 11 Feb 2007 17:22
33 lines
1912 bytes
1912 bytes
Hello! :)
I'm making a litle program with WinHTTP.
I use this form to load the HTML page:
do
{
WinHTTP1->URL = "www.zzzzzz.com";
WinHTTP1->Read(true);
DoSomethingWithThePage();
}
while(to_continue == true);
The to_continue is set to false if the user press a button named "cancel".
The HTML text is put in a AnsiString when the event OnDone (of WinHTTP)
is executed.
I set Read(...) to true, because I need to load the page entirely before
continue the loop (and do something with the page ;) hehehe).
I'd like to know if is safe to put this code on a thread (i don't know
much of threads...), because if I do SOMETHING in my program, like click
a buton, menu etc, or move de bar on the Memo that show the results of
DoSomethingWithThePage() this looping freezes until I stop what I'm
doing, and I'd like that this don't happens ;)
If this is possible, can someone show-me a simple code to put this piece
of code on a thread?
Thanks :)
Technical Details
Message-ID:
<45cf42a5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: feeec,39c9e565f02857d3,start X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Sun, 11 Feb 2007 14:22:08 -0300 From: Eduardo Jauch <eduardo.jauch@gmail.com> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: WinHTTP and Threads Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 201.24.207.252 Message-ID: <45cf42a5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171210917 201.24.207.252 (11 Feb 2007 08:21:57 -0800) Lines: 33 Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail