> I had create GUI app, and a thread to handle THttpCli, below partial of > code.
You don't need a thread. Or if you do, tell me why you think you need a thread. > What could be the probelm? > Do I need call PeekMessage? Your thread need to have a message pump so that events are triggered. Without message pump: no event and nothing happend in an event driven component. You can use the message pump built into TWSocket or create your own (GetMessage/TranslateMessage/DispatchMessage). -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "KL Chin" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Thursday, July 21, 2005 2:10 PM Subject: [twsocket] HttpCli with PostASync > Hi, > > I had create GUI app, and a thread to handle THttpCli, below partial of > code. > My problem was, after call PostAync( ); Not connection .. nothing happend > at all. > If I call Post( ); everything working. > > What could be the probelm? > Do I need call PeekMessage? > > Regards > KL Chin > > void __fastcall TWebThrd::Execute( void ) > { > DWORD fdwwait,dwwait; > String serr; > > FwebHttp = new THttpCli( NULL ); > if ( FwebHttp ) > { > FwebHttp->MultiThreaded = true; > FwebHttp->SendStream = new TMemoryStream( ); > FwebHttp->RcvdStream = new TMemoryStream( ); > FwebHttp->OnDocBegin = webOnDocBgn; > FwebHttp->OnDocEnd = webOnDocEnd; > FwebHttp->OnDocData = webOnDocBuf; > } > FOnUsed = 1; > fdwwait = INFINITE; > while ( !Terminated && !FOnQuit && !__AppOnQuit ) > { > dwwait = WaitForMultipleObjects( > web_EVMAXI,FEvents,false,fdwwait ); > switch ( dwwait ) > { > case (WAIT_OBJECT_0 + web_EVPOST) : > FwebHttp->URL = FwebURLs; // + FwebPrms; > FwebHttp->Proxy = FwebProxy; > FwebHttp->FollowRelocation = FFollow; > FwebHttp->PostASync( ); // Get page from internet > break; > ... > } > } > } > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be