1

在 windows mobile 中,GPS com 端口设置在 start\settings\system\External GPS 中完成。但是我想以编程方式进行上述更改。为此,我比较了设置前后手机的注册表设置,现在以编程方式进行设置:

[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"

但即使在完成这些注册表设置后,GPS 端口设置也不会显示在“开始\设置\系统\外部 GPS”中,但我仍然可以在注册表中看到它们。

如何以编程方式更改“start\settings\system\External GPS”设置?

4

1 回答 1

2

更改注册表设置后,您必须调用IOCTL_SERVICE_REFRESH中间驱动程序。 http://msdn.microsoft.com/en-us/library/bb202088.aspx

此外,您可能会发现有关注册表值本身的 MSDN 文档很有用:http: //msdn.microsoft.com/en-us/library/bb202016.aspx

-保罗H

于 2011-02-25T17:20:55.070 回答