This function retrieves the current protection status.

[C++Builder/Visual C++] long PK3QueryProtect(void);
[Delphi] function PK3QueryProtect: Longint;
[Visual Basic] Function PK3QueryProtect() As Long

Parameters

None

Return Values

Value Explanation
0 Not Protected
1 Protected (the application does not run)
2 Has exceeded allowable number of uses. (Valid if "number of uses" protection is used.)
3 Has exceeded allowable number of days. (Valid if "number of days" protection is used.)
4 Has exceeded allowable number of months. (Valid if "number of months" protection is used.)
5 Has exceeded allowable date. (Valid if "date" protection is used.)
6 The PC's datetime has been altered. (Valid for "number of days", "number of months", and "date" type protection.)
7 Runtime environment (PC) is different.
8 The protection file is not correct.
9 The lockword is not correct.
10 The password is not correct.
11 Other
12 The protection file is being used improperly

Explanation

The PK3QueryProtect function retrieves the current protection status..

The PK3QueryProtect function is disabled if the PK3Initialize function has not been executed.

When the return value is 0, you can get more detailed information depending on the type of protection used ("number of uses", "number of days", "number of months", and "date" type protection)

by referring to the following properties: PK3QueryRemainCount, PK3QueryRemainDays, and PK3QueryRemainMonths)

The return value of 12 means that allowable uses, days, months, or date has been exceeded and then correct protection file was overwritten by an improper protection file.