• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I access NetInfo from Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I access NetInfo from Cocoa?


  • Subject: Re: How do I access NetInfo from Cocoa?
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 9 Oct 2001 09:35:49 -0700

On Monday, October 8, 2001, at 07:01 PM, Josh M. Hurd wrote:

Here is what I came up with:

struct passwd *theUserInfo;
NSString *UID;

theUserInfo = getpwnam([[userName stringValue] cString]);

UID = [[NSNumber numberWithInt:theUserInfo->pw_uid] stringValue];

userName is a user editable TextField.
UID is an NSString because I need it in a pathname.

I would suggest not using the cString method here. Strings at the BSD level are generally UTF8, so you should probably specify that.

Douglas Davidson


References: 
 >Re: How do I access NetInfo from Cocoa? (From: "Josh M. Hurd" <email@hidden>)

  • Prev by Date: RE: DLL hell (was: Cocoa newbie frustration)
  • Next by Date: Re: DLL hell (was: Cocoa newbie frustration)
  • Previous by thread: Re: How do I access NetInfo from Cocoa?
  • Next by thread: Re: How do I access NetInfo from Cocoa?
  • Index(es):
    • Date
    • Thread