Hi there,
Create a gps handler first, as follows
int GpsHandler = CreateFile("COM8:", GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
where, COM8: = your devices gps port(will be different)
1.Then set the gps port timeouts value like ReadIntervalTimeout.
2.Then set the Baud rate,stop bits,parity and bytesize, for the gps port.
At last as desired interval you need to read the data from the gps port:
static byte[] ByteArray= new byte[1024];
ReadFile(GpsHandler, ByteArray, 1024, ref RedItems, 0);
this red data will be a byte value ,change it to a string like this
string gpsdata = System.Text.Encoding.ASCII.GetString(ByteArray, 0, RedItems);
Result: gpsdata will have your gps related data