Using Microsoft. windowsmobile. configuration;
Configuration management depends on Configuration Service Providers (CSP)
Each CSP is a set of settings.
Each set has an XML
Example: CSP in the browser favorites folder
<WAP-provisioningdoc>
<Characteristic type = "browserfavorite">
<Characteristic type = "Download">
<Parm name = "url" value = "http://www.the01city.com"/>
</Characteristic>
</Characteristic>
</WAP-provisioningdoc>
You can use the following code to set the GPRS contact:
Try
{
Xmldocument xmlpreferred = new xmldocument ();
String A = getapplicationdirectory () + "// cmwap. xml ";
Xmlpreferred. Load ();
Configurationmanager. processconfiguration (xmlpreferred, true );
}
Catch (exception ER)
{
MessageBox. Show (ER. tostring ());
}
The contents of cmwap. XML are as follows:
<WAP-provisioningdoc>
<! -- GPRS connection -->
<Characteristic type = "cm_uplsentries">
<Characteristic type = "cmcc wap">
<Parm name = "destid" value = "{436ef144-b4fb-4863-a041-8f905a62c572}"/>
<Characteristic type = "devspecificcellular">
<Parm name = "maid" value = "cmwap"/>
</Characteristic>
</Characteristic>
</Characteristic>
<! -- Proxy sets proxy -->
<Characteristic type = "cm_proxyentries">
<Characteristic type = "cmcc wap Gateway">
<Parm name = "srcid" value = "{436ef144-b4fb-4863-a041-8f905a62c572}"/>
<Parm name = "destid" value = "{7022e968-5a97-4051-bc1c-4408e2fba5d9}"/>
<Parm name = "proxy" value = "10.0.0.172: 9201"/>
<Parm name = "type" value = "2"/>
</Characteristic>
<Characteristic type = "CMCC Internet proxy">
<Parm name = "srcid" value = "{436ef144-b4fb-4863-a041-8f905a62c572}"/>
<Parm name = "destid" value = "{F28D1F74-72BE-4394-A4A7-4E296219390C}"/>
<Parm name = "proxy" value = "10.0.0.172: 80"/>
<Parm name = "type" value = "1"/>
</Characteristic>
</Characteristic>
</WAP-provisioningdoc>
Http://blog.163.com/szx_rencaijob/blog/static/38447108200921905721640/
In addition, if you want to automatically select your network and access point When configuring "select Network", you can also select a network in XML format. You can configure cm_proxyentries.