EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.

Unlock a device

Updated: August 27, 2013

Applies To: Windows 8, Windows 8.1

There is no Windows Runtime (WinRT) API to unlock a locked device. However, a subset of the mobile broadband API includes the PIN Management API. To unlock a device, do the following:

  1. Get the network adapter ID for the account device:

    account.currentNetwork.networkAdapter. networkAdapterId
    
  2. Create a CLSID_MbnInterfaceManager instance.

  3. Advise to the IID_IMbnPinManagerEvents and IID_IMbnPinEvents connection points (these are used for getting PIN state and unblock/unlock results).

  4. Pass the network adapter ID into IMbnInterfaceManager::GetInterface to get an IMbnInterface interface for the device.

  5. Get an IMbnPinManager interface for the device by calling IMbnInterface::QueryInterface.

  6. Call IMbnPinManager::GetPinState to get the PIN state of the device (the state returned by using the connection point that was registered in step 3).

  7. Determine how the device is locked or blocked by using the MBN_PIN_INFO::pinState parameter that is passed into the event.

  8. Get an IMbnPin interface for the appropriate PIN by calling IMbnPinManager::GetPin.

  9. Call either IMbnPin::Unlock or IMbnPin::Unblock, based on how the device is locked (see step 7).

  10. Listen for Unlock or Unblock results by using IMbnPinEvents registration to know whether the operation was successful.

See Also

Mostrar:
© 2015 Microsoft