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.

IMbnRegistration::GetCurrentDataClass method

Gets the current data class in the current network.

Syntax


HRESULT GetCurrentDataClass(
  [out] ULONG *currentDataClass
);

Parameters

currentDataClass [out]

A pointer to a MBN_DATA_CLASS value. This parameter is meaningful only if the function returns S_OK.

Return value

This method can return one of these values.

Return codeDescription
S_OK

The operation was successful.

E_PENDING

The data classes are not available. the Mobile Broadband service is currently probing the device for the information. When the data classes are available, the Mobile Broadband service will call the OnPacketServiceStateChange method of IMbnRegistrationEvents.

E_MBN_PIN_REQUIRED

A PIN is required to get the data classes.

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

The GetCurrentDataClass method returns the data class in the current network. This value can be set to MBN_DATA_CLASS_NONE if value is not known.

The current data class can change automatically as a device moves from one cellular network to another. Whenever such a change occurs, the Mobile Broadband service will notify applications by calling the OnPacketServiceStateChange method of IMbnRegistrationEvents.

For the recoverable error E_MBN_PIN_REQUIRED, the Mobile Broadband service will again try to fetch this information from the device when the error condition is over (when a PIN is entered). Afterwards, the Mobile Broadband service will call the OnPacketServiceStateChange method of IMbnRegistrationEvents.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

None supported

IDL

Mbnapi.idl

See also

IMbnRegistration

 

 

Show:
© 2017 Microsoft