Partager via


Querying Network Settings in Connection Manager (Windows Embedded CE 6.0)

1/6/2010

You can use the DMProcessConfigXML function to query any of the network settings.

For example, to retrieve the globally unique identifier (GUID) of a Point-to-Point Protocol (PPP) connection, you can query for the value attribute of the DestId parameter of a PPP connection defined inside the CM_PPPEntries configuration service provider.

To do this, pass the following XML string to the pszWXMLin parameter of DMProcessConfigXml:

<characteristic type="CM_PPPEntries">
    <characteristic type="BTPhoneNetPPP">
      <parm-query name="DestId" />
    </characteristic>
</characteristic>

DMProcessConfigXml responds by returning the following XML string in ppszwXMLout:

<characteristic type="CM_PPPEntries">
    <characteristic type="BTPhoneNetPPP">
      <parm name="DestId" value="{A1182988-0D73-439e-87AD-2A5B369F808B}" />
    </characteristic>
</characteristic>

To query a GUID for a specific connection

  1. In your application code, call DMProcessConfigXML and pass in the XML string for a configuration service provider. The XML string must contain a tag called <parm-query>, as illustrated in the above code example.

  2. When DMProcessConfigXML returns, the returned XML string in the ppszwXMLout buffer contains the GUID in the value attribute of the <parm> tag. Extract the GUID from the returned XML string.

  3. Put the GUID into the CONNMGR_CONNECTIONINFO structure that you create, and then pass that structure into a call to ConnMgrEstablishConnection or ConnMgrEstablishConnectionSync.

See Also

Tasks

Establishing an Internet Connection Using Connection Manager

Concepts

Connection Manager How-to Topics

Other Resources

Connection Manager Application Development