🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
1 messages
1 total messages Started by Eduardo Jauch Sun, 11 Feb 2007 17:22
WinHTTP and Threads
#279
Author: Eduardo Jauch
Date: Sun, 11 Feb 2007 17:22
33 lines
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 :)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads