BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WinHTTP and Threads

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Web)
View previous topic :: View next topic  
Author Message
Eduardo Jauch
Guest





PostPosted: Sun Feb 11, 2007 11:22 pm    Post subject: WinHTTP and Threads Reply with quote



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 Wink 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 Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Web) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.