Stuff
public text v1 · immutable#include "stdafx.h"
#include "CNTFS.h"
int main(int argc, const char * argv[])
{
CString m_newOwner;
CString m_sourcePath;
m_SourcePath = _T("test.txt");
m_newOwner = _T("test");
DWORD accessMask = FILE_ALL_ACCESS;
CNTFS acl;
if (0 == acl.DeleteDACL(m_sourcePath, false) )
{
printf("DACL Removed\n");
return 0;
}
if (0 == acl.AddACEToDACL(m_sourcePath, m_newOwner, accessMask) )
{
printf("New ACE Entry added\n");
return 0;
}
else
{
printf("Epic fail\n");
return 1;
}
}