I am writing a function which will take a parameter as a path to a folder (remote/local) and if the program has write access to the folder, it wil return true else false.
For this i am using
LPWSTR lpFilePahtW = strFilePath.GetBuffer(0);
PSECURITY_DESCRIPTOR psd = NULL;
dwReturn = GetNamedSecurityInfo(lpFilePahtW, SE_FILE_OBJECT,DACL_SECURITY_INFORMATION, NULL, NULL, NULL ,NULL, &psd);
if(dwReturn == ERROR_SUCCESS)
if(lpbDaclPresent == TRUE)
if(pDacl != NULL)
//donno how to process pDacl
first of all is this method correct.
If yes, i am not sure how to do i get the pDacl to read the values.
Also do i need to assign values to psd or somewhere else?
I donno how the memory assignment is done?