Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using SetSecurityInfo

204 views
Skip to first unread message

sami

unread,
Jun 18, 2004, 5:29:32 AM6/18/04
to
hi all,

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!

Raj

unread,
Jun 25, 2004, 11:49:44 AM6/25/04
to

You can add NULL DACL by calling Set[Named]SecurityInfo as

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.

0 new messages