Windows Mobile - Updating GPRS settings using C#

2019-09-04 20:16发布

问题:

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?