Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

Reading/Writing to Com Ports

$
0
0

Are you able to read/write to Com Ports in PB using the standard File functions?  I have seen many posts saying you can do the following...

 

ll_Job = fileopen ("COM1:", StreamMode!, Write!, Shared!)

 

filewrite (ll_Job, char(27) + char(112) + char(80) + char(25) + char(250))

 

fileClose(ll_Job)

 

However, I have tried it and it won't let me open the port.  (For "ll_Job" is always set to -1).  Is there a best way to communicate with ports in PB?  We used to use an ActiveX control, but it doesn't work with 64 bit Windows.  Thanks.

 

I'm using PB 12.5.2 Build 5789 in Windows 7 64 bit.


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>