Windows Mobile - Updating GPRS settings using C#

余生颓废 提交于 2019-12-12 04:08:05

问题


I am using the following code to update the APN settings on a Windows Mobile MC67 device:

XmlDocument configDoc = new XmlDocument();
configDoc.LoadXml(
      "<wap-provisioningdoc>" +
        "<characteristic type=\"CM_GPRSEntries\">" +
           "<characteristic type=\"Connection_Name\">" +                      
              "<parm name=\"UserName\" value=\"web\"/>" +
              "<parm name=\"Password\" value=\"web\"/>" +
              "<characteristic type=\"DevSpecificCellular\">" +
                 "<parm name=\"GPRSInfoAccessPointName\"  value=\"APN_Value\" />" +
              "</characteristic>" +
           "</characteristic>" +
        "</characteristic>" +
      "</wap-provisioningdoc>"
);
ConfigurationManager.ProcessConfiguration(configDoc, false);

It updates the APN value, but doesn't apply it until I click on Edit APN and Save thereafter. Does anyone have any idea?

来源:https://stackoverflow.com/questions/36181592/windows-mobile-updating-gprs-settings-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!