IMbnConnectionEvents::OnConnectComplete method (mbnapi.h)

Important

Starting in Windows 10, version 1803, the Win32 APIs described in this section are replaced by the Windows Runtime APIs in the Windows.Networking.Connectivity namespace.

Notification method that signals the completion of a connection operation.

Syntax

HRESULT OnConnectComplete(
  [in] IMbnConnection *newConnection,
  [in] ULONG          requestID,
  [in] HRESULT        status
);

Parameters

[in] newConnection

An IMbnConnection interface that represents the device on which the connection operation has completed.

[in] requestID

The request ID assigned by the Mobile Broadband service to identify the connection operation.

[in] status

The completion status.

A calling application can expect one of the following values.

Value Meaning
S_OK
The operation was successful.
E_MBN_SIM_NOT_INSERTED
There is no SIM in the device.
E_MBN_PIN_REQUIRED
A PIN is required for the operation to complete.
E_MBN_SERVICE_NOT_ACTIVATED
The network service subscription has expired.
E_MBN_PROVIDER_NOT_VISIBLE
The provider is not visible. This applies only to manual registration mode.
E_MBN_INVALID_ACCESS_STRING
The connection access string is not correct.
HRESULT_FROM_WIN32(ERROR_INVALID_PASSWORD)
The name or password using in the connection profile is not correct.
E_MBN_VOICE_CALL_IN_PROGRESS
An active voice call is in progress.
E_MBN_MAX_ACTIVATED_CONTEXTS
There is already an Mobile Broadband context active. The Mobile Broadband service does not currently support multiple active contexts.
E_MBN_RADIO_POWER_OFF
The device radio is off.
E_MBN_PACKET_SVC_DETACHED
No active attached packet service is available.
E_MBN_ACTIVE_CONNECTION
The device is already connected to the network.

Return value

This method must return S_OK.

Remarks

Once an activation context is established, an application can use IMbnConnection to get the current connection state.

When the connection operation results in an error, an application can call the GetActivationNetworkError method of the IMbnConnection interface to obtain network error information.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server None supported
Target Platform Windows
Header mbnapi.h

See also

IMbnConnectionEvents