This method retrieves the number of uses that remain before the application is locked.

[Visual Basic] Public Function QueryRemainCount() As Integer
[C#] public int QueryRemainCount();

Return Value

Value Explanation
-1

If the file set in the DllFileName property is disabled.

If theQueryProtect method returns a value of 0 (Unlocked) and a password, without an expiration, has been generated and used to unlock the application.

If the QueryProtect method returns a value other than 0.

0 or above The remaining number of uses

Explanation

The QueryRemainCount method retrieves the number of uses that remain before the application is locked. When using "Number of Uses" protection, this method will return the number of uses remaining. For all other types of protection, this method will return -1.

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

Also See

PasswordProtect Members | Newtone.ProtectKit.Win.PasswordProtect