Click here to Skip to main content
15,914,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalwin32 threads Pin
Ann668-Jul-05 12:20
sussAnn668-Jul-05 12:20 
GeneralRe: win32 threads Pin
Blake V. Miller8-Jul-05 16:29
Blake V. Miller8-Jul-05 16:29 
Generalto IE programmers Pin
llp00na8-Jul-05 8:08
llp00na8-Jul-05 8:08 
GeneralRe: to IE programmers Pin
Jose Lamas Rios8-Jul-05 10:47
Jose Lamas Rios8-Jul-05 10:47 
GeneralRe: to IE programmers Pin
Ravi Bhavnani8-Jul-05 11:40
professionalRavi Bhavnani8-Jul-05 11:40 
GeneralRe: to IE programmers Pin
ThatsAlok8-Jul-05 21:21
ThatsAlok8-Jul-05 21:21 
GeneralHelp with LookupAccountSid Pin
Dimitris Vikeloudas8-Jul-05 5:54
Dimitris Vikeloudas8-Jul-05 5:54 
GeneralRe: Help with LookupAccountSid Pin
David Crow8-Jul-05 6:07
David Crow8-Jul-05 6:07 
I use something like:

PSECURITY_DESCRIPTOR    pSecurityDescriptor;
PSID                    pSidOwner;
SID_NAME_USE            rSidNameUse;
DWORD                   dwAccountSize,
                        dwDomainSize;
char                    *pszAccount,
                        *pszDomain;
 
if (GetNamedSecurityInfo(
    (LPSTR) lpszObjectName, 
    SE_FILE_OBJECT, 
    OWNER_SECURITY_INFORMATION, 
    &pSidOwner, 
    NULL, 
    NULL, 
    NULL, 
    &pSecurityDescriptor) == ERROR_SUCCESS)
{
    dwAccountSize = 0;
    dwDomainSize  = 0;
    
    LookupAccountSid(NULL, pSidOwner, NULL, &dwAccountSize, NULL, &dwDomainSize, &rSidNameUse);
 
    pszAccount = new char[dwAccountSize];
    pszDomain  = new char[dwDomainSize];
 
    if (LookupAccountSid(NULL, pSidOwner, pszAccount, &dwAccountSize, pszDomain, &dwDomainSize, &rSidNameUse) == TRUE)
        ...
 
    delete [] pszAccount;    
    delete [] pszDomain;
 
    LocalFree(pSecurityDescriptor);
}



"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown


GeneralRe: Help with LookupAccountSid..still looking Pin
Dimitris Vikeloudas8-Jul-05 6:22
Dimitris Vikeloudas8-Jul-05 6:22 
GeneralRe: Help with LookupAccountSid..still looking Pin
David Crow8-Jul-05 8:11
David Crow8-Jul-05 8:11 
GeneralUnderstanding Debug Information Displayed Pin
jerry1211a8-Jul-05 5:28
jerry1211a8-Jul-05 5:28 
GeneralRe: Understanding Debug Information Displayed Pin
S. Senthil Kumar8-Jul-05 6:03
S. Senthil Kumar8-Jul-05 6:03 
GeneralRe: Understanding Debug Information Displayed Pin
Tom Archer8-Jul-05 6:56
Tom Archer8-Jul-05 6:56 
GeneralIcon of an executable file Pin
voda8-Jul-05 5:10
voda8-Jul-05 5:10 
GeneralRe: Icon of an executable file Pin
David Crow8-Jul-05 5:40
David Crow8-Jul-05 5:40 
GeneralRe: Icon of an executable file Pin
Blake V. Miller8-Jul-05 16:44
Blake V. Miller8-Jul-05 16:44 
GeneralVC7, PROPVARIANT, #import Pin
peterchen8-Jul-05 4:41
peterchen8-Jul-05 4:41 
GeneralMultithreaded Client Pin
vadimpl8-Jul-05 4:32
vadimpl8-Jul-05 4:32 
GeneralRe: Multithreaded Client Pin
Ravi Bhavnani8-Jul-05 11:43
professionalRavi Bhavnani8-Jul-05 11:43 
GeneralDouble pointers question Pin
Budric B.8-Jul-05 4:06
Budric B.8-Jul-05 4:06 
GeneralRe: Double pointers question Pin
David Crow8-Jul-05 5:37
David Crow8-Jul-05 5:37 
GeneralRe: Double pointers question Pin
John R. Shaw8-Jul-05 10:13
John R. Shaw8-Jul-05 10:13 
GeneralRe: Double pointers question Pin
Toby Opferman8-Jul-05 10:31
Toby Opferman8-Jul-05 10:31 
GeneralDisplaying MFC dialog Pin
cdm5z8-Jul-05 3:39
cdm5z8-Jul-05 3:39 
GeneralRe: Displaying MFC dialog Pin
Manfred Staiger8-Jul-05 3:55
Manfred Staiger8-Jul-05 3:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.