Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Kyle Sluder
On Thu, Sep 3, 2009 at 12:47 PM, David Duncan wrote: > The kernel you are booted into has no effect on the binaries that will > launch. However, your project settings will determine what build is > launched, and older projects will often have i386 as default (a newly > created project shows that x8

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread David Duncan
On Sep 3, 2009, at 12:35 PM, Scott Lahteine wrote: As it turns out Gestalt(gestaltUserVisibleMachineName) returns error -5551 in a 64 bit binary anyway. I wasn't seeing this because apparently my build architecture - "Standard Universal (32/64 bit)" - was/is for some reason launching the 32

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Scott Lahteine
On Sep 3, 2009, at 3:14 PM, Clark Cox wrote: At this point, as far as I can tell Gestalt() is still a viable solution, and the returned pointer is just guaranteed to be in the low 4GB of RAM. Not possible. On 64-bit Intel (at least with the default settings), there is no such thing as a vali

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Clark Cox
On Thu, Sep 3, 2009 at 10:56 AM, Scott Lahteine wrote: >> On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: >>> >>> My preference pane uses Gestalt(gestaltUserVisibleMachineName, >>> &mySInt32), coercing the SInt32 into a StringPtr to get the Machine >>> Name. On 64-bit I get a warning because Stri

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread David Duncan
On Sep 3, 2009, at 10:56 AM, Scott Lahteine wrote: CSCopyMachineName() returns the name of the computer as set by the user in the Sharing preference pane, which is not the same thing as the gestaltUserVisibleMachineName. The "Machine Name" I want is the Apple-defined identifier for the type

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Scott Lahteine
On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ensure th

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-02 Thread Kyle Sluder
NSHost now does this. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-02 Thread Jim Correia
On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ens

Getting a StringPtr from Gestalt on 64-bit

2009-09-02 Thread Scott Lahteine
My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ensure that the returned pointer is in the low 4 gigs