Re: get current user name?




"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



.



Relevant Pages

  • Re: get current user name?
    ... >> 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? ... >> Balmer Consulting ...
    (comp.lang.c)
  • Re: get current user name?
    ... >>> basically to check if the user is logged in as root and if not, ... Why are you mentioning the POSIX standard? ... > Balmer Consulting ...
    (comp.lang.c)
  • Re: Finding blocks of symbols on a 2dimensional array
    ... The balls must border horizontally or vertically in order to be on ... (Sorry for not mentioning this on the first post). ... Prev by Date: ...
    (comp.lang.c)