C++ – How to read NMEA sentences in windows Vista using c++

cgpswinapiwindows-vista

I have a GPS device connected to my system which is running Windows Vista.

I wanted to read the NMEA sentences from GPS device and print on screen.

How I will come to know, on which port the GPS device has been connected, as there can be other devices also connected on various com ports. I am developing the application in c++,

Does Microsoft provide any API's for this?

Best Answer

What kind of port is it? If it is a serial port, try connecting to all serial ports, one at a time, and then just listen for a NMEA string. If one is received, use the port, if one is not received, go to the next port.

Related Topic