GPS Programming Tips for Windows Mobile - Part 1
NETCF: Memory leak... now what??
Supporting Kiosk-Applications on Windows Mobile (Technically achievable vs. supported)
Wireless Programming on Windows Mobile: supported or not supported?
Establishing GPRS Connection on Windows CE and Windows Mobile: Sample Codes
Disable WebBrowser's Context-Menu in NETCF applications
MAPI on Windows Mobile 6: Programmatically retrieve mail BODY (sample code)
Microsoft released a HotFix for NETCF v3.5 on Windows Mobile 6.1.4 onwards, to address basic functionalities of WebBrowser control
The right approach to get a Contact’s last communication (IItem’s PIMPR_SMARTPROP)
Remote Desktop Mobile (RDP Client) disconnects after 10 minutes of inactivity
Support Boundaries for Windows Mobile Programming (Developing Drivers, for example... Or even WiFi Programming)
Miei post in italiano sul team-blog del Supporto Tecnico agli Sviluppatori
This was a good exercise as it showed how powerful XPath queries are, this time for XML Provisioning... Basically what the developer was interested on was the GPRSInfoAccessPointName of the CM_GPRSEntries Configuration Service Provider. The XML Provisioning Query was:
<wap-provisioningdoc> <characteristic-query type="CM_GPRSEntries" /> </wap-provisioningdoc>
The code is:
XmlDocument configDoc = new XmlDocument(); configDoc.LoadXml( "<wap-provisioningdoc>" + "<characteristic-query type=\"CM_GPRSEntries\" />" + "</wap-provisioningdoc>"); XmlDocument output = ConfigurationManager.ProcessConfiguration(configDoc, true);
/wap-provisioningdoc/characteristic/characteristic[@type="<INSERT GPRS ENTRY HERE>"]/characteristic/parm[@name="GPRSInfoAccessPointName"]
I recommend using RapiConfig precisely in order to verify what’s the GPRS ENTRY name is configured in your case, otherwise the application may not work. In my testings I tried with a GPRS operator of mine (“TIM”). In NETCF, you can run a XPath query by using the .SelectSingleNode() or .SelectNodes() methods of the class XmlDocument:
XmlNode aux = output.SelectSingleNode( "/wap-provisioningdoc/characteristic/characteristic[@type=\"" + OperatorSettingToBeSearched + "\"]/characteristic/parm[@name=\"GPRSInfoAccessPointName\"]");
In conclusion, the sample code you may customize is (this was a NETCF v2.0 Console application):
static string OperatorSettingToBeSearched = "TIM"; static void Main(string[] args) { XmlDocument configDoc = new XmlDocument(); configDoc.LoadXml( "<wap-provisioningdoc>" + "<characteristic-query type=\"CM_GPRSEntries\" />" + "</wap-provisioningdoc>"); XmlDocument output = ConfigurationManager.ProcessConfiguration(configDoc, true); XmlNode aux = output.SelectSingleNode("/wap-provisioningdoc/characteristic/characteristic[@type=\"" + OperatorSettingToBeSearched + "\"]/characteristic/parm[@name=\"GPRSInfoAccessPointName\"]"); MessageBox.Show(aux.Attributes["value"].Value); }