共用方式為


SimGetPhoneLockedState

Send Feedback

The SimGetPhoneLockedState function checks whether the SIM is currently awaiting a password. This function is part of the SIM Manager API set that enables access to information stored on the SIM card.

Note   PUK is the code to unlock your SIM if you forget the password.

HRESULT SimGetPhoneLockedState (
  HSIM hSim,
  LPDWORD lpdwLockedState 
);

Parameters

  • hSim
    Points to a valid HSIM handle.
  • lpdwLockedState
    Points to a SIM_LOCKEDSTATE constant.
    Value Description
    SIM_LOCKEDSTATE_UNKNOWN The locking state is unknown.
    SIM_LOCKEDSTATE_READY Not awaiting a password (unlocked).
    SIM_LOCKEDSTATE_SIM_PIN Awaiting the SIM PIN.
    SIM_LOCKEDSTATE_SIM_PUK Awaiting the SIM pointer to an unknown (PUK).
    SIM_LOCKEDSTATE_PH_SIM_PIN Awaiting the Phone to SIM Personalization PIN.
    SIM_LOCKEDSTATE_PH_FSIM_PIN Awaiting the Phone to first SIM Personalization PIN.
    SIM_LOCKEDSTATE_PH_FSIM_PUK Awaiting the Phone to first SIM Personalization PUK.
    SIM_LOCKEDSTATE_SIM_PIN2 Awaiting the SIM PIN2.
    SIM_LOCKEDSTATE_SIM_PUK2 Awaiting the SIM PUK2.
    SIM_LOCKEDSTATE_PH_NET_PIN Awaiting the Network Personalization PIN.
    SIM_LOCKEDSTATE_PH_NET_PUK Awaiting the Network Personalization PUK.
    SIM_LOCKEDSTATE_PH_NETSUB_PIN Awaiting the Network Subset Personalization PIN.
    SIM_LOCKEDSTATE_PH_NETSUB_PUK Awaiting the Network Subset Personalization PUK.
    SIM_LOCKEDSTATE_PH_SP_PIN Awaiting the Service Provider Personalization PIN.
    SIM_LOCKEDSTATE_PH_SP_PUK Awaiting the Service Provider Personalization PUK.
    SIM_LOCKEDSTATE_PH_CORP_PIN Awaiting the Corporate Personalization PIN.
    SIM_LOCKEDSTATE_PH_CORP_PU Awaiting the Corporate Personalization PUK.

Return Values

HRESULTs are either S_OK for success, or one of the SIM_E error constants defined in the SIM Manager Error Constants table.

Requirements

Smartphone: Smartphone 2002 and later
Pocket PC: Pocket PC 2002 and later
OS Versions: Windows CE 3.0 and later
Header: simmgr.h
Library: cellcore.lib

See Also

SIMLOCKINGPWDLENGTH

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.