-
Schon möglich, daß ich völlig danebenliege:
PSECURITY_DESCRIPTOR psd = NULL;
PSID psid = NULL;
if(ERROR_SUCCESS == GetNamedSecurityInfo(TEXT("b:\\FileName.txt"), SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION, &psid, NULL, NULL, NULL, &psd))
{
SID_NAME_USE snu;
DWORD dwCbName, dwCbDomain;
TCHAR szDomain[256], szName[256], szDomainName[512];
dwCbDomain = sizeof(szDomain) / sizeof(TCHAR);
dwCbName = sizeof(szName) / sizeof(TCHAR);
LookupAccountSid(NULL, psid, szName, &dwCbName, szDomain, &dwCbDomain, &snu);
_tcscpy(szDomainName, szDomain);
if(dwCbDomain)
_tcscat(szDomainName, TEXT("\\"));
_tcscat(szDomainName, szName);
LocalFree(psd);
MessageBox(NULL, szDomainName, NULL, MB_OK);
}
Meintest Du das?