I want to read data into my VB.Net 2005 program from a GlobalPoint GPS reeceiver on COM1 of my Intermec Pocket PC. I am opening the Comm port using:
infilehandler = CreateFile("COM1:", &HC0000000,0,0,3,0,0,).
and then reading bytes by using:
RetCode = ReadFile(Cint(infilehandler),inbuff,inbuff.Length,numReadWrite,0)
This technique worked fine when I was reading from a Bluetooth GPS or an internal GPS in my WM6 computer. However, on the Intermec the GPS output I read is corrupted.
I think the problem is that the GlobalPoint GPS comes in through a physical Com port (not a virtual one as in Bluetooth) and that I am not programming the Baud Rate, No. data bits, No. stop bits and Parity (should be 4800,N,8,1).
Can anybody help me with code that couples these parameters to COM1? I've heard that SetCommState can play a role here but I can find no examples of its use under the Compact Framework..