IMbnPin::Unblock 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.

Unblocks a blocked PIN.

Syntax

HRESULT Unblock(
  [in]  LPCWSTR puk,
  [in]  LPCWSTR newPin,
  [out] ULONG   *requestID
);

Parameters

[in] puk

The password unblock key (PUK) value for this PIN type.

[in] newPin

A new PIN to be set for this PIN type.

[out] requestID

A request ID set by the Mobile Broadband service to identify this asynchronous request.

Return value

This method can return one of these values.

Return code Description
S_OK
The method completed successfully.
HRESULT_FROM_WIN32(ERROR_SERVICE_NOT_ACTIVE)
The Mobile Broadband service is not running on this system.
E_HANDLE
Invalid interface. The Mobile Broadband device has probably been removed from the system.
HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
Invalid interface. Most likely the Mobile Broadband device has been removed from the system.
E_ACCESSDENIED
This method is not allowed for calling process privileges.

Remarks

The Unblock method unblocks the PIN for the pin type by entering the PUK and sets a new PIN. The PinType property of this IMbnPin represents the type of PIN which is being changed.

This is an asynchronous operation. If the method returns with success, then upon completion of the operation, the Mobile Broadband service will call the OnUnblockComplete method of IMbnPinEvents.

Whenever the GetPinState method of IMbnPinManager results with the current PIN state set to MBN_PIN_STATE_UNBLOCK, then the application should use Unblock on the PIN type which is returned in PinInfo.pinType passed by the OnGetPinStateComplete method of IMbnPinManagerEvents.

Invoking this method requires administrator privileges.

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

IMbnPin