Click here to Skip to main content
15,891,788 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All
Currently i am writing a application where a program processes files in a folder and creates new files and save them in another folder.

I want to know if it is possible to make folders inaccessible /invisible to everyone till the completion of the programe ??



I am working in vc6 in WinXP. i found a few solutions on internet but they are in C# or VB. i am looking for some programming solutions /hints in VC++ or c/sdk , C++
and not willing to use some ready made .dlls etc.
Posted
Comments
mbue 10-Mar-11 6:16am    
Tell us more about the C# & VB solutions. You can fulfill your work in a other folder and finally rename it to the name you want.

1 solution

you could use the CREATE_FILE function and specify no sharing rights. Take a look at this link:

http://msdn.microsoft.com/en-us/library/aa363858(v=vs.85).aspx[^]

you could also take a look at LockFile or LockFileEx function (they only work on files not folders)


Regards,

K.D
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 9-Mar-11 15:17pm    
I agree, my 5. Proposed as Answer.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900