This method retrieves the password set by the SetPassword method.

[Visual Basic] Public Function QueryPassword() As String
[C#] public string QueryPassword();

Return Value

Returns the password as a string if successful, otherwise returns String.Empty.

Explanation

The QueryPassword method retrieves the password set by the SetPassword method. If the protection is not unlocked then the QueryPassword method will fail. The length of the password will be the same number of characters as the length of the lockword or the PcID, whichever is longer.

The Initialize method must be executed before executing the QueryPassword method. If the Initialize method has not been successfully executed, the QueryPassword method is disabled.

Also See

PasswordProtect Members | Newtone.ProtectKit.Win.PasswordProtect