- Brent Albrecht
- PowerBuilder
- Monday, 24 January 2022 02:46 PM UTC
I'm using PB 2021 build 2703 on Windows 10 to communicate with a serial device through the COM4: port, using CreateFile and WriteFile API calls. Everything works great, but the device I'm communicating with requires a character value 0 in a lot of it's commands. I'm passing a string value to WriteFile so am not able to include the character value of 0 in it. The declaration of WriteFile is below
Function Long WriteFile (long hFile, ref string lpBuffer, long nNumberOfBytesToWrite, ref long lpNumberOfBytesWritten, ref string lpOverlapped) Library "kernel32" alias for "WriteFile;Ansi"
I'm hoping somebody is able to tell me how to make this work ?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.