如何在 Windows Mobile 中以编程方式设置 GPS 的 com 端口
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改注册表设置后,您必须在中间驱动程序上调用
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