Establish temporary network connectivity

Updated: September 4, 2013

Applies To: Windows 8, Windows 8.1

Telecommunication applications cannot initiate long-term connections. However, if you need temporary connectivity to a specific network, you can use the Mobile Broadband API as follows:

  1. Create an instance of CLSID_MbnConnectionManager.

  2. Register to the IID_MbnConnectionEvents connection point.

  3. Create an instance of CLSID_MbnInterfaceManager.

  4. Get an IMbnInterface interface for the device by passing the account device ID into MbnInterfaceManager::GetInterface. (For more info, see Unlock a device.)

  5. Obtain an IMbnConnection interface for the device by calling IMbnInterface::GetConnection.

  6. Establish a connection by calling IMbnConnection::Connect. The connectionMode parameter must be set to MBN_CONNECTION_MODE_TMP_PROFILE, and the strProfile parameter must be a mobile broadband profile description.

The results of the connect attempt are returned by using the IMbnConnectionEvents::OnConnectComplete method. To disconnect when you are finished, invoke the IMbnConnection::Disconnect method. Status is returned by using IMbnConnectionEvents::OnDisconnectComplete.

See Also