I want to write a program with C/C++ for disabling net share folders and to prevent users from create a new share folder. Does anyone know the methods?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a method of doing it with C++ here.
Here is another stackoverflow question that addresses a similar issue.
In short, you need to call GetNamedSecurityInfoW() method with appropriate parameters to get the security descriptor of the folder and then you have to modify the ACL of the folder through methods explained here.