Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function removes the current lock applied to the phone.

Syntax

HRESULT RIL_UnlockPhone(
  HRIL 
hRil,
  LPCSTR 
lpszPassword,
  LPCSTR 
lpszNewPassword
);

Parameters

hRil

Handle to the RIL instance returned by RIL_Initialize.

lpszPassword

Password to unlock the phone. This value can be no longer than MAXLENGTH_PASSWORD characters.

lpszNewPassword

New password. This value can be set to NULL, unless the current locked state is one of the RIL_LOCKEDSTATE_*_PUK constants. This value can be no longer than MAXLENGTH_PASSWORD characters.

Return Value

Positive HRESULTvalues indicate success and are used as command identifications for matching the asynchronous call result. Negative HRESULTvalues indicate an error. Errors are defined in the Ril.h file.

An asychronous result of RIL_RESULT_OKindicates success. The lpDatanotification parameter is set to NULL.

Remarks

The RIL proxy translates the RIL_UnlockPhonefunction into IOCTL_RIL_UnlockPhonewhen the RIL proxy calls RIL_IOControl.

Requirements

Header ril.h
Library Ril.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also