SimGetPhoneLockedState

Windows Mobile 6.5
A version of this page is also available for
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.

Aa921970.note(en-us,MSDN.10).gifNote:
PUK is the code to unlock your SIM if you forget the password.


HRESULT SimGetPhoneLockedState (
  HSIM hSim,
  LPDWORD lpdwLockedState 
);

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.

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

Headersimmgr.h
Librarycellcore.lib
Windows Embedded CEWindows Embedded CE 6.0 and later
Windows MobilePocket PC 2002 and later, Smartphone 2002 and later

Community Additions

Show: