schtrenz

schtrenz

  • NA
  • 3
  • 4.2k

GPS intermediate driver for Windows Mobile 6

Nov 2 2011 12:04 PM
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

Answers (2)