如何在 Windows Mobile 中以编程方式设置 GPS 的 com 端口

发布于 2024-10-19 09:09:24 字数 1016 浏览 1 评论 0原文

在 Windows Mobile 中,GPS com 端口设置在开始\设置\系统\外部 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端口设置也不会显示在“start\settings\system\External GPS”中,但我仍然可以在注册表中看到它们。

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

筱武穆 2024-10-26 09:09:24

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

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

-PaulH

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文