TelnetDLX blocking mode & Windows Message Queue (General questions)
Hi,
We integrated the TelnetDLX component (COM version) in our VB6 application. The telnet component does blocking Execute commands.
Sometimes, we encountered the following situation: it seems like some Windows Messages, sent by an internal component, are not received by the main VB6 application window.
It looks like the problem occurs when the WaitFor pattern is not found in the response. We're using (positive) timeout values for the Execute command. We cannot reproduce this systematically, though.
Is there any chance that the telnet component consumed those windows messages silently? E.g., when waiting for the WaitFor pattern, and refreshing the form where the wodTelnetDLXCom is positioned.
thanks,
Stijn
Re: TelnetDLX blocking mode & Windows Message Queu
Hi Stijn,
Most probably this is happening because you are using Blocking mode. Blocking Property set to True. In Blocking Mode commands are executing line by line and next command execute when previous finish. So component is blocked until command is executing.
You can use also component in non Blocking mode. Blocking Property set to False. In that case you can't use WaitFor and Execute Method. You should use Events, Received or PromptReceived Event and send command there.
More help for Blocking Property you can find here:
http://www.weonlydo.com/TelnetDLX/Help/WODTELNETDLXLIB~wodTelnetDLX~Blocking.html
Hope I helped.
Regards,
Drazen
Re: TelnetDLX blocking mode & Windows Message Queu
Hi,
Indeed, we're using the blocking mode. In fact, that's the feature we liked about your product. The telnet commands are called from a script environment. I'm afraid we cannot change this anymore.
Anyway, do you know what windows messages are consumed by the telnet component while waiting in blocking mode? The form will continue to process windows messages, isn't it?
I guess it would be ok when processing of the windows message queue is delayed during blocking telnet operations. However, it seems like that particular message is not there anymore.
By the way: does the TelnetDLX component post windows messages to the queue? Maybe our VB6 application is picking up the wrong windows message.
Regards,
Stijn
Re: TelnetDLX blocking mode & Windows Message Queu
Hi Stijn,
Unfortunately, when you use blocking mode, everything will be blocked until the certain method finishes execution on the server.
That means that whole form will actually freeze until Execute either receives the response, or timeout occurs. That could be called as a side-effect of blocking mode. When execution comes to Execute or WaitFor call, it will stop there until done.
Regards,
Damba