Click to See Complete Forum and Search --> : How to lock file...?


kimsh00
May 28th, 1999, 07:38 PM
Hi ^^
I want to lock a specific file or directory.
for example, after my program sets a file or dir to lock, nobody can delete the file or dir in windows 95, 98.
it's just like security process in windows nt.
I want to make the security process.
Do you have any idea? PLEASE let me know..
THANKS

Hurol Aslan
May 31st, 1999, 01:32 PM
Hello,

If you open a file by associating it with a CFile object you can specify a sharing option like shareDenyNone, shareDenyWrite, etc. If you want to lock a directory, check the functions available in direct.h; they let you change or modify directories. Hope this helps.