Login  
Search All Forums
Dart Home | PowerTCP Winsock for ActiveX | Custom Development Reply | PowerTCP Winsock for ActiveX Topics | Forums   
AuthorForum: PowerTCP Winsock for ActiveX
Topic: Migration to Windows 7 problem
chpw

From: Germany
Posts: 5
Member Since: 09/27/06
posted May 3, 2014 2:52 AM

Hi all,

I have a very strange problem using PowerTCP winsock on Windows 7 in a certain configuration. Unfortunately I can't reproduce the behaviour in a self containing app, so I like to know if some suggestions exists.
This is a PowerBuilder (meanwhile) 12.5. application which runs for several years using PowerTCP winsock control without problems on Windows XP an Windows 2000 machines communication with several devices such as SPS machines and barcode scanners. Now when it is installed on a Windows 7 machine the communication with ONE device type (a scanner) fails. Other devices work okay, even testing that using a debug server works. The behaviour is as follows:
The PowerTCP winsock client connects to the scanner (which is a TCP/IP server on the LAN). The receive event fires for the first time, checking the buffersize results in 22 bytes as expected. Calling the receive message returns 0 bytes as return code and an empty string or blob (have tried both). After that happened the receive event don't fires again although there are messages sent from the trigger. The connection keeps established.
I have connected a telnet session with this scanner and that works without problems.
I have connected a self developed debug tool which uses PowerTCP winsock control with this scanner and that works without problems.
I'm really out of ideas now. Any hints?

TIA,

Chris Werner
Nick B (Admin)

From: Utica, NY USA
Posts: 572
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted May 5, 2014 8:52 AM

Hello,

We haven't heard of any issue like this, so we don't have any specific suggestions. You stated that you created a debug tool with our PowerTCP Winsock that does work, while your existing application doesn't?
chpw

From: Germany
Posts: 5
Member Since: 09/27/06
posted May 6, 2014 1:37 PM

Hello,

thanks for your answer.

Yes, that's true, the debug tool, a very simple PowerBuilder application runs without problems if used as a replacement for the real PowerBuilder application. Both applications are using the same PowerTCP control (PowerTCP winsock TCP control) in exactly the same way: Connecting to the server (the scanner), checking the ReceiveBufferCount in the receive event, then calling the Receive method, checking for the return value and the length of the data. All that is logged into a text file. In the real PowerBuilder application the event fires, ReceiveBufferCount is 22 as expected. But the receive method returns 0 and the length of the data (either a string or a blob, I've tried both) is also 0. Then the receive event never fires again (although the scanner sends data for sure).
For the szenario works using the debug tool it seems clear it isn't the PowerTCP control to blame. A second fact is, when I replace the scanner with the debug tool (which in this case acts as a TCP/IP server) and connect the real PowerBuilder application against it, it works. The third fact is, if I run the real PowerBuilder application on a Windows XP or Windows 2000 machine it works with the scanner. But as you may imagine, the customer wants exactly the combination which fails: Scanner, real PowerBilder application, Windows 7.

I'm out of ideas how I can examine the problem in more detail.

Thanks again,
Chris Werner
Nick B (Admin)

From: Utica, NY USA
Posts: 572
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted May 6, 2014 2:19 PM

I can only suggest to compare your debug tool against your application, or migrate your application's functionality into your debug tool to discover what difference is causing the different behaviors. This appears to be specific to your application, not our component.
chpw

From: Germany
Posts: 5
Member Since: 09/27/06
posted May 23, 2014 7:23 AM

The reason for the problem seems to be an attempt to set the keepAlive property while the state is different from tcpConnected. I changed

  object.keepAlive = true

into

  if state = 2 then
   object.keepAlive = true
  end if

and it works.

While it is documented that "this option can only be set when the State property is tcpConnected"
I find it a little bit strange that this command has so much impact without triggering an exception (at least in PowerBuilder).
Nick B (Admin)

From: Utica, NY USA
Posts: 572
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted May 27, 2014 10:05 AM

Thank you for the update. I have entered this as TTWeb5738 to investigate if we can improve its behavior under these circumstances. For information and updates on its status, please contact jamie.powell@dart.com.
Reply | PowerTCP Winsock for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX