🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12842

Re: LookupAccountName()

#12842
From: Mike Collins
Date: Sun, 16 Nov 2003 12:16
30 lines
1970 bytes
Thanks Remy, as it happens, my code did actually work correctly, it was the
parameters that I was passing that were incorrect.  I only realised that
when I saw you code and the line

PSID pSid = GetSIDFromUsername("joesme");

- where you were passing JUST the username.  I had been passing the domain
(well actually the Workgroup name) and the username.  I did this because it
states so in the MSDN help:

"lpAccountName
[in] Pointer to a null-terminated string that specifies the account name.
Use a fully qualified string in the domain\username format to ensure that
LookupAccountName finds the account in the desired domain."

-Mustn't be appicable when operating on a Workgroup instead of a domain.

Thanks again

Mike C


"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:3fb5970d$1@newsgroups.borland.com...
>
> "Mike Collins" <mikec@kr8.co.uk> wrote in message
> news:3fb5891d@newsgroups.borland.com...
>
> > Does anyone have any robust code examples of
> > Loo
Technical Details
Message-ID: <3fb7648b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fb5891d@newsgroups.borland.com> <3fb5970d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5d9b0a085dbf01d2
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-16 04:09:12 PST
Reply-To: "Mike Collins" <mikec@kr8.co.uk>
From: "Mike Collins" <mikec@kr8.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fb5891d@newsgroups.borland.com> <3fb5970d$1@newsgroups.borland.com>
Subject: Re: LookupAccountName()
Date: Sun, 16 Nov 2003 12:16:58 -0000
Lines: 32
Organization: kr8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 81.2.78.34
Message-ID: <3fb7648b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1068983435 81.2.78.34 (16 Nov 2003 03:50:35 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail