Contents - Index - Previous - Next
TZipMaster.OnPasswordError
TZipMaster See also: Note on passwords:
OnPasswordError event occurs when a DLL needs a password for encryping or decrypting.
Type TPasswordErrorEvent = Procedure( Sender: TObject; IsZipAction: Boolean; var NewPassword: String; ForFile: String; var RepeatCount: LongWord ; var Action: TPasswordButton ) of object;
Type TPasswordButton = ( pwbOk, pwbCancel, pwbCancelAll, pwbAbort );
property OnPasswordError: TPasswordError;
Description:
Occurs when adding or extracting and a password is needed but not set by the Password property and also when extracting and the given password is incorrect.
IsZipAction is set to true when the error is originating from the Zip DLL i.e. an Add action else it is from the UnZip DLL. (an Extract action)
The ForFile parameter will give the path+file for which the password is needed.
RepeatCount is at first set to the PasswordReqCount number and decremented on each event call.
When needed you can modify RepeatCount and set it to value from 0 to 15 this will not influence PasswordReqCount.
Action is the action to take when returning from this event, possible actions are: pwbOk, pwbCancel, pwbCancelAll or pwbAbort. Default is pwbOk.
NOTE: This event will be called at most 15 times per file even when you try to increase RepeatCount multiple times.