I'm sorry to report that your program has a few problems.
First: I get this error message with one particular folder:
Code: Select all
---------------------------
Protected Folder
---------------------------
Selected folder could NOT be protected!
---------------------------
OK
---------------------------
The folder is named "E:\Program Files\0-MyApps\~BUGS~\zxcvg8i" (don't ask why).
Second: If you browse for a folder, then protect it, and then select
unprotect and click the "Protect" button to unprotect it, the app says:
Code: Select all
---------------------------
Protected Folder
---------------------------
The selected folder has already been protected!
---------------------------
OK
---------------------------
It seems you have to browse to the protected folder name and select that,
before you can unprotect. A bit inconvenient.
Third: The protection is extremely weak, because all one has to do is
rename the folder and all contents are accessible. You need to think
of something stronger. The code in this post is a good starting point:
http://www.purebasic.fr/english/viewtopic.php?t=23493