Search All Forums
Dart Home | PowerTCP SSL for ActiveX | Custom Development Reply | PowerTCP SSL for ActiveX Topics | Forums   
AuthorForum: PowerTCP SSL for ActiveX
Topic: "Invoke" method not called for sending/receiving

From: Ottawa, ON Canada
Posts: 2
Member Since: 03/25/08
posted March 25, 2008 11:12 AM


I've derived a class from the sample ISecureTCP class, and I'm using it to establish a secure connection and send/receive data. That part is working fine...however, for some reason the "Invoke" callback method isn't being triggered when I do a Send or a Receive. It gets called for a variety of other reasons (State, Error, Certificate, and Authenticate), but never when sending or receiving. This is a problem, because I never know when I have received data waiting for me.

My class is being used in a DLL, compiled in Visual C++ 6.0. I've tried initializing COM both with CoInitialize and with CoInitializeEx (using COINIT_MULTITHREADED), but that had no effect. It's also worth noting that when I run the sample "Secure TCP Client" project, the Send and Receive callbacks to Invoke come through just fine.

Why is this happening? What can I do to fix it?

Adam Feiner

From: Rome, NY USA
Posts: 315
Member Since: 03/15/06
posted March 26, 2008 1:23 PM

Hi Adam,

I tried considerably however unfortunately could not find any reason for the same.
I would suggest you to please model your application in the same way as we had done in our samples.

Best Regards,

From: Ottawa, ON Canada
Posts: 2
Member Since: 03/25/08
posted April 16, 2008 2:21 PM

I have found a solution to my problem. As it turns out, the reason why Send and Receive callbacks were not being invoked is because there was no mechanism in my DLL to pump Windows messages. I had to add my own Windows message-pumping loop. Once I did this, the messages from the Dart library arrived as expected. However it is worth noting that these callback messages were not being intercepted by my message pump unless the original call had been made from the same thread. 

Does this match the expected behaviour of the library?
Reply | PowerTCP SSL for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX