SimGetPhoneLockedState

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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.

Syntax

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 Value

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

Requirements

Header simmgr.h
Library cellcore.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC 2002 and later, Smartphone 2002 and later

See Also

Reference

SIMLOCKINGPWDLENGTH