tags:

views:

66

answers:

2

hi,

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 an mysql database.

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

The program has to run under windows xp, and i have to make it an service.

thanks, Sebastian

+1  A: 

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.

Amigable Clark Kant
+1  A: 

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.

Blank Xavier
I'm inclined to think that the only person who ever wrote a Windows GUI program from scratch was Petzold; everyone else took one of his programs as a basis.
MSalters
@MSalters: heh, I claim that dubious honour =-) Bitch it was too! Windows does not tell you what's going wrong. You just have to get it all right, then it magically works.
Blank Xavier