CreateFile & WriteFile
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I would like to send an ASCII string out my serial port by pressing one of the buttons. I don't need it to effect anything else just the one specific string. A friend gave me an idea how to do it. I was wondering if everyone could take a look at my code and tell me what I need to change to complete it. I hope this makes sense what I said. I am new to Visual C++ const char * AsciiCmd = "GO"; CreateFile(AsciiCmd, GENERIC_READ |GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); WriteFile(AsciiCmd, GENERIC_READ //I don't know what to put in next or if this is even going to work. thankyou for any help you can give. Mavrock