This function retrieves the password that has been set by the PK3SetPassword function.

[C++Builder/Visual C++] BOOL PK3QueryPassword(LPSTR lpszPassword, LPLONG lpPasswordLen);
[Delphi] function PK3QueryPassword(lpszPassword: PAnsiChar; var lpPasswordLen: Longint): LongBool;
[Visual Basic] Function PK3QueryPassword(ByVal lpszPassword As String, lpPasswordLen As Long) As Long

Parameters

Name Explanation
lpszPassword The password set by PK3SetPassword

In C++Builder, Visual C++, and Delphi. this is a string terminating with Null. In Visual Basic, this is a string of specified size.
lpPasswordLen The number of digits in the retrieved password (lpszPassword)

Return Value

Returns the True (nonzero) if successful, otherwise returns False (0).

Explanation

The PK3QueryPassword function retrieves the password that has been set by the PK3SetPassword function. When protection is unlocked, this function can be used to query the password that was set. (If protection is not unlocked, the PK3QueryPassword function will return True but 0 will be set in the lpPasswordLen parameter.

The PK3QueryPassword function is disabled when the password has no expiration or if the PK3Initialize function has not been executed.

Note: The number of digits in the password will be set to match the number of digits in the lockword or the PcID, whichever is largest.