IMbnRegistration::GetAvailableDataClasses 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.

Gets the available data classes in the current network.

Syntax

HRESULT GetAvailableDataClasses(
  [out] ULONG *availableDataClasses
);

Parameters

[out] availableDataClasses

A pointer to a bitwise OR combination of MBN_DATA_CLASS values. This parameter is meaningful only if the function returns S_OK.

Return value

This method can return one of these values.

Return code Description
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.

Remarks

GetAvailableDataClasses returns the set of data class possible in the current network. These values can be set to MBN_DATA_CLASS_NONE if value is not known.

Available data classes can change automatically as a device moves from one cell 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

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

See also

IMbnRegistration