Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMbnConnection::GetConnectionState method

Gets the current connection state of the device.

Syntax


HRESULT GetConnectionState(
  [out, retval] MBN_ACTIVATION_STATE *ConnectionState,
  [out, retval] BSTR                 *ProfileName
);

Parameters

ConnectionState [out, retval]

A pointer to an MBN_ACTIVATION_STATE structure that contains the state of the connection.

ProfileName [out, retval]

A pointer to a string that contains the name of the connection profile. This parameter is valid only when ConnectionState is MBN_ACTIVATION_STATE_ACTIVATED. When this string is not NULL, the calling application must free this string by calling SysFreeString.

Return value

This method can return one of these values.

Return codeDescription
S_OK

The method completed successfully.

Note  This method can return S_OK when ProfileName is NULL. Make sure that your client is capable of handling a NULL ProfileName even if the call is successful.
 
E_PENDING

The activation state not available. The Mobile Broadband service is probing the device for the information. The calling application can be notified when the activation state is available by registering for the OnConnectStateChange method of IMbnConnectionEvents.

E_MBN_PIN_REQUIRED

A PIN is required to get the call state.

E_MBN_SIM_NOT_INSERTED

A SIM is not inserted in the device.

E_MBN_BAD_SIM

A bad SIM is inserted in the device.

 

Remarks

This method can return S_OK when ProfileName is NULL. Make sure that your client is capable of handling a NULLProfileName even if the call is successful.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnConnection

 

 

Show:
© 2017 Microsoft