Re: get current user name?
- From: "Mark" <sober@xxxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 18:51:21 GMT
"Alan Balmer" <albalmer@xxxxxxx> wrote in message
news:j67cg1ptc0gop3sjc75o0nhbcohb2oo7n0@xxxxxxxxxx
> On Fri, 19 Aug 2005 17:11:17 GMT, "Mark" <sober@xxxxxxxxxxxx> wrote:
>
>>
>>"Alan Balmer" <albalmer@xxxxxxx> wrote in message
>>news:d51cg1pc2lu927jf4qofr6a0vlj7q0c69q@xxxxxxxxxx
>>> On Fri, 19 Aug 2005 06:33:21 GMT, rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard
>>> Bos) wrote:
>>>
>>>>djbitchpimp@xxxxxxxxxxxxx wrote:
>>>>
>>>>> How do I retrieve the username of the currently logged in user? I
>>>>> basically to check if the user is logged in as root and if not, exit
>>>>> the program.
>>>>
>>>>You call GetUserName, which is declared in <winbase.h>...
>>>
>>> Odd - I can't seem to find either the function or the include file
>>> mentioned in the C standard, or even the POSIX standard.
>>
>>Why are you mentioning the POSIX standard? This is comp.lang.c
>>where we deal strictly with the ISO/IEC international standard.
>>
>>> Are you sure you're in the right newsgroup?
>>Exactly, that was his point... couldn't you tell by the 'oops' :-)
>>
> No. Considering the placement, I assumed that he had just realized the
> OP was using Unix ("su root") rather than Windows. If the "oops" meant
> he knew it was off-topic, why send it?
Because he's Richard Bos...
surely that isn't the first post of his you've read
.
- References:
- get current user name?
- From: djbitchpimp
- Re: get current user name?
- From: Richard Bos
- Re: get current user name?
- From: Alan Balmer
- Re: get current user name?
- From: Mark
- Re: get current user name?
- From: Alan Balmer
- get current user name?
- Prev by Date: Re: get current user name?
- Next by Date: Re: get current user name?
- Previous by thread: Re: get current user name?
- Next by thread: Re: get current user name?
- Index(es):
Relevant Pages
|