I want to use the function GetFileSecurity() to retreive the security descripter of a file in the Master File Table from NTFS..
The function definition is
BOOL WINAPI GetFileSecurity(
__in LPCTSTR lpFileName,
__in SECURITY_INFORMATION RequestedInformation,
__out_opt PSECURITY_DESCRIPTOR pSecurityDescriptor,
__in DWORD nLength,
__out LPDWORD lpnLengthNeeded
);
The fifth attibute is the length of the Buffer in which Security descripter attribute for a particular file is stored.. But how can we know the length before extracting the Security descripter ?? Is it fixed or is there any function which can help...