Link to home
Start Free TrialLog in
Avatar of Paul Maker
Paul MakerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

how to use GetFileSecurity function in C

Im using the GetFileSecurity function in C and im getting the following error 'The data area passed to a system call is too small'. the requestedinformation variable is set to 1 for an owner information request.  

my variable are :
SECURITY_INFORMATION requestedinformation;
SECURITY_DESCRIPTOR psecuritydescriptor;
DWORD lpnlengthneeded;
char temp_name[20] = "test.txt";

the function call is :
GetFileSecurity((LPCTSTR)temp_name,requestedinformation,&psecuritydescriptor,sizeof(SECURITY_DESCRIPTOR),&lpnlengthneeded);
ASKER CERTIFIED SOLUTION
Avatar of ScottyDawg
ScottyDawg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial