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 ?