Re: Equivalent to Windows API 'GetUserName()'
Re: Equivalent to Windows API 'GetUserName()'
- Subject: Re: Equivalent to Windows API 'GetUserName()'
- From: David Remahl <email@hidden>
- Date: Fri, 6 Jun 2003 11:37:27 +0200
There is also:
FOUNDATION_EXPORT NSString *NSUserName(void);
FOUNDATION_EXPORT NSString *NSFullUserName(void);
in NSPathUtils.h, in case you want to get to NSStrings directly. Also,
to get the full user name in plain C, I think you would have to query
NetInfo, though I'm not sure.
/ Rgds, David
On fredag, jun 6, 2003, at 04:59 Europe/Stockholm, mathew wrote:
On Thursday, Jun 5, 2003, at 21:46 US/Eastern, Andy Satori wrote:
I'm certain this is dead easy and I'm just overlooking it, but I want
to find out the current user's name from Objective C. I don't see
any foundation objects that look like they fit the bill.
% man 2 getlogin
Some things are too simple to need an Objective-C wrapper :-)
mathew
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.