简体   繁体   中英

C language, serial port reader

I want to make a program that reads a serial port (V.24). with the info from the serial port I need to split a string up, and add it to a MySQL database.

I don't know C very well, so I need some help with what functions I should use

The program has to run under windows XP, and I have to make it an service.

thanks, Sebastian

Services are a pain to debug. I suggest writing your code as a normal application first - command line will do - and then, once it works, converting it to a service (which is a mechanical process).

In general, Windows GUI based apps in C are a PITA to write for the first time. Very finicky, very sensitive. A command line app or a service will be quite a bit easier.

I recommend reading this . As for if this will work as a service, I am not sure, but it should.

You can also look at existing open source projects, to see if you can take that source as a starting point, or if they already solve your problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM