Login  
Search All Forums
Dart Home | PowerTCP Ping Enterprise for Ax | Custom Development Reply | PowerTCP Ping Enterprise Tool Topics | Forums   
AuthorForum: PowerTCP Ping Enterprise Tool
Topic: Delgating to OnEchoComplete
cmaxim

From: Plano, TX USA
Posts: 3
Member Since: 01/09/06
posted January 9, 2006 2:31 PM

I have the latest DLLs and am developing in Delphi 2005. The sample application has been compiled and is working correctly. Now on to the problem.. :)

I have a multithreaded application that is using the Ping Enterprise Tool to send pings to various IP addresses. The main application spawns a thread that contains the ping control and uses the StartEcho method for asynchronous pinging. The problem I am encountering is that I never receive an OnEchoComplete event. (I've also tried setting the OnEchoCompleteEx event and PowerBuilderMode to true.) Is there anything special that needs to be done to delegate the event in this setup? 

Also of concern, we anticipate having multiple background threads each with their own ping control operating at the same time. Will each control be operating on their own ports, or is it possible that a ping from one thread may be received by another thread?
cmaxim

From: Plano, TX USA
Posts: 3
Member Since: 01/09/06
posted January 9, 2006 2:35 PM

I forgot to mention that the proper CoInitialize calls are being made since this is an ActiveX control in a separate thread. Also, the StartEcho() method does not generate any errors and appears to be working properly. 

The only real difference between how I am using it and how it is used in the sample application is that the sample application instantiates the control at form creation rather than programmatically creating it. This application does not have the ping control "dropped" on the form. Perhaps it needs a form handle for messaging purposes? If so, is the handle exposed anywhere that I can get to it programmatically?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted January 9, 2006 2:37 PM

You probably need to create a message pump on the thread. If the thread is not processing messages, then you would experience something like you describe.

cmaxim

From: Plano, TX USA
Posts: 3
Member Since: 01/09/06
posted January 9, 2006 2:54 PM

What messages should I be looking for and/or how would I go about hooking up the control to the pump?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted January 9, 2006 3:09 PM

I'm not sure as that is Delphi specific code and I am not a Delphi programmer. Are you sure that you hooked up the events? Again, I don't know how to do that in Delphi because I always put the control on the form, letting Delphi create the events for me.

If you are not able to get anywhere, I would suggest that you contact support@dart.com to discuss more advanced support options.

Reply | PowerTCP Ping Enterprise Tool Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX