1

In windows mobile, the GPS com port settings are done in start\settings\system\External GPS. However i want to make the above changes programatically. For this I compared the registry settings of the mobile before and after the settings, and now set them programatically:

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver]
"IsEnabled"=dword:00000001

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers]
"CurrentDriver"="Control Panel Configured Device"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers\Control Panel Configured Device]
"Baud"=dword:0000e100
"CommPort"="COM8:"
"InterfaceType"="COMM"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Multiplexer]
"DriverInterface"="COM0:"

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Multiplexer\ActiveDevice]
"Index"=dword:00000000
"Prefix"="COM"
"Context"=dword:12344160
"Flags"=dword:00000002
"Keep"=dword:00000001
"Dll"="GPSID.dll"

But even after doing these registry settings, the GPS port settings do not show in the "start\settings\system\External GPS", but I can still see them in the registry.

How do i make the changes to "start\settings\system\External GPS" settings programatically?

Vicky
  • 1,107
  • 2
  • 13
  • 25

1 Answers1

2

You have to call IOCTL_SERVICE_REFRESH on the intermediate driver after changing the registry settings. http://msdn.microsoft.com/en-us/library/bb202088.aspx

Also, you may find the MSDN documentation on the registry values themselves useful: http://msdn.microsoft.com/en-us/library/bb202016.aspx

-PaulH

PaulH
  • 7,759
  • 8
  • 66
  • 143
  • I made this change, but still I can see all the changes except the following : `[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers\Control Panel Configured Device] "Baud"=dword:0000e100 "CommPort"="COM8:" "InterfaceType"="COMM"`
    What else might be going wrong?
    – Vicky Feb 28 '11 at 17:43
  • Never Mind, i found the problem, The CurrentDriver had to be set on HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Drivers – Vicky Feb 28 '11 at 18:20