Set Connection Settings

  • Thread starter Thread starter Guest
  • Start date Start date
As opposed to what? They're *always* set programmatically. If you're using
the UI and the Properties window, then open the code sheet and look in the
InitializeComponents methods where the designer puts the code it generates.

-Chris
 
Also if your device is a Smartphone or Pocket PC Phone Edition you can use
the XML Configuration API to provision dialup, GPRS etc settings
programmatically. See the SDK documentation for the XML Schema for the
various configuration service providers e.g. CM_GPRSEntries.
I've posted a managed wrapper here:-
http://www.opennetcf.org/sourcebrow...enNETCF/Configuration/ConfigurationManager.cs

Once you have created a provisioning document - and the exact format depends
on the configuration service provider e.g. for CM_GPRSEntries
<wap-provisioningdoc>
<characteristic type="CM_GPRSEntries">
<characteristic type="GPRS1">
<parm name="DestId" value="{436EF144-B4FB-4863-A041-
8F905A62C572}" />
<characteristic type="DevSpecificCellular">
<parm name="BearerInfoValid" value="1" />
<parm name="GPRSInfoValid" value="1" />
<parm name="GPRSInfoProtocolType" value="2" />
<parm name="GPRSInfoL2ProtocolType"
value="PPP" />
<parm name="GPRSInfoAccessPointName"
value="internet3.thephone-company.com" />
<parm name="GPRSInfoAddress"
value="" />
<parm name="GPRSInfoDataCompression"
value="1" />
<parm name="GPRSInfoHeaderCompression"
value="1" />
<parm name="GPRSInfoParameters" value="" />
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

You pass this into ProcessConfigXml e.g.

string result = ConfigurationManager.ProcessConfigXml(provisioningDocument,
ConfigXmlFlags.Process);

Peter
 
Hi Chris!

If you mean Connection settings of RAS (Settings-Connections-...) then you
can also get and set its using Windows registry. Connection settings, RAS
phone numbers, etc. stores in Windows registry.
 
Back
Top