开发者

how programatically set com ports for GPS in windows mobile

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 Int开发者_如何学JAVAermediate 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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜