IMbnRegistration::GetCurrentDataClass method (mbnapi.h)
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 current data class in the current network.
HRESULT GetCurrentDataClass( [out] ULONG *currentDataClass );
A pointer to a MBN_DATA_CLASS value. This parameter is meaningful only if the function returns S_OK.
This method can return one of these values.
||The operation was successful.|
||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.|
||A PIN is required to get the data classes.|
||A SIM is not inserted in the device.|
||A bad SIM is inserted in the device.|
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.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||None supported|