Ok so I was wondering how i would make a lock for a certain program, lets say a text document. The program would open when the user tried to open the document and ask for a password, and if the password is entered correctly then it will open and obviousley if it isnt it wont. How many lines would a program like this be? can i do it in just plain c++ or do i need to use Winapi? Im almost positive i need to use win api thats why i posted here, but idk.