| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Multiple object instances using non-blocking mode |
| User192 Posts: 7 Member Since: 03/13/02 |
posted April 1, 2004 10:40 AM When using multiple instances of web tool and non-blocking mode, web tool reacts as if there was only one object. Here's a sample code: Private m_oRequestHeader As New DartStrings Private WithEvents oHTTP1 As Http Private WithEvents oHTTP2 As Http Function Get() Set oHTTP1 = New Http Set oHTTP2 = New Http oHTTP1.Cache = False oHTTP1.Timeout = 0 oHTTP2.Cache = False oHTTP2.Timeout = 0 oHTTP1.Url = "http://localhost/Test.asp" oHTTP1.Get MyResultData1, m_oRequestHeader oHTTP2.Url = "http://localhost/Test.asp" oHTTP2.Get MyResultData2, m_oRequestHeader End Function I get "A method is currently blocking the thread. Some PowerTcp methods are not reentrant. For example, if you set a timer and enter the Get method with a Timeout, and attempt to enter the Get method again, then this error is generated." when calling "GET" in the second instance. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 1, 2004 11:32 AM Using the code you provided, I do not get an error. Are you sure you get an error with the exact code? Just so you know, you are incorrectly using the same DartStrings for both requests. That may or may not have something to do with your problem. |
| User192 Posts: 7 Member Since: 03/13/02 |
posted April 1, 2004 11:57 AM Sorry Tony, it was a bug of mine. In fact it also works great with only one DartStrings! Many thanks for your help. |
| User192 Posts: 7 Member Since: 03/13/02 |
posted April 1, 2004 2:28 PM Tony, perhaps you could me help with one more thing. Is there any way to work using this method (Non-blocking mode) outside a form, like a class or a bas module in VB6? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 1, 2004 2:31 PM Sure. The code you posted would work in a class. |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|