hi
i bought a navigator from Lexand with wm CE 6.0
1. I cant find the gps intermediate driver in the Registry, why? I guss a gpsapi.dll exists...
2. how can I use the gps from a c# form. lets say I want a form and if I click a button I get the actual GPS cordinates.
I found already this
#region PInvokes to gpsapi.dll
[DllImport("gpsapi.dll")]
static extern IntPtr GPSOpenDevice(IntPtr hNewLocationData, IntPtr hDeviceStateChange, string szDeviceName, int dwFlags);
[DllImport("gpsapi.dll")]
static extern int GPSCloseDevice(IntPtr hGPSDevice);
[DllImport("gpsapi.dll")]
static extern int GPSGetPosition(IntPtr hGPSDevice, IntPtr pGPSPosition, int dwMaximumAge, int dwFlags);
[DllImport("gpsapi.dll")]
static extern int GPSGetDeviceState(IntPtr pGPSDevice);
#endregion
and read endless articles but I dont know how to open the GPS with GPSOpenDevice and I also dont know how to get the data with GPSGetPosition
Would be really great for an code sample!
thanks
schtrenz
Loading
schtrenzPosted Nov 4, 2011, 4:33 PM
but I still dont know how the GPS receiver gets the data or where does it store it?
I already found some articles that it send it to the COM port perhaps but I am not sure.
with a C# prog I see that COM3 and sometimes COM4 is open but there is no data
I retrieve it with string myData = serialPort.readExisting(); //serialPort can be COM3 or COM4
Javeed M ShaikhPosted Nov 2, 2011, 2:42 PM
Writing Your Own GPS Applications: Part I