can anyone give me or point me to an example (best in c++) of how to
use SetSecurityInfo() (to change the access rights to a directory)?
thanks a lot!
SetSecurityInfo(hDir,SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION /* Or other SECURITY_INFORMATION flags */,
NULL,NULL,NULL,NULL).
If u add a NULL DACL, Everybody will get access.
So better to create ur own DACL and pass it as 6th paramater.
Or have a look at ConvertStringSecurityDescriptorToSecurityDescriptor() API.
- &Raj.