On 12 Jun 2009, at 15:21, Bill Monk wrote:
On Jun 12, 2009, at 5:43 AM, "Gerriet M. Denkmann" wrote:
StringPtr c = (void *)response;
NSUInteger cle = *c;
char *cu = malloc( cle + 1);
memcpy( cu, c + 1, cle);
cu[
Won't CSCopyMachineName do the job?
Op 12-jun-2009, om 8:24 heeft Gerriet M. Denkmann het volgende
geschreven:
On 11 Jun 2009, at 18:55, Graham Cox wrote:
On 12/06/2009, at 2:08 AM, Arun wrote:
Hi All,
Is there any API in cocoa which can be used to fetch computer name
which is
gettin
Eric Schlegel wrote:
However, be aware that [[NSHost currentHost] name] can block for an
exceedingly long time, so if you use it, always call it on a
thread; and some of other API recommended here, such as
SCDynamicStoreCopyComputerName, is probably a better choice.
And beware that "comp
On Fri, Jun 12, 2009 at 12:44 PM, Eric Schlegel wrote:
>
> On Jun 12, 2009, at 7:14 AM, Adam R. Maxwell wrote:
>
>> There is also NSHost, which has -name and -names.
>
> However, be aware that [[NSHost currentHost] name] can block for an
> exceedingly long time, so if you use it, always call it on
On Jun 12, 2009, at 7:14 AM, Adam R. Maxwell wrote:
There is also NSHost, which has -name and -names.
However, be aware that [[NSHost currentHost] name] can block for an
exceedingly long time, so if you use it, always call it on a thread;
and some of other API recommended here, such as
On Jun 12, 2009, at 12:37 AM, Gerriet M. Denkmann wrote:
Amazing how many ways to get a hostname do exist!
There is also NSHost, which has -name and -names.
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list (Coco
On Jun 12, 2009, at 5:43 AM, "Gerriet M. Denkmann" wrote:
StringPtr c = (void *)response;
NSUInteger cle = *c;
char *cu = malloc( cle + 1);
memcpy( cu, c + 1, cle);
cu[cle] = '\0';
NSLog(@"%s gestal
On 12 Jun 2009, at 09:08, Tito Ciuro wrote:
Hi Arun,
How about -[NSProcessInfo hostname]? Check the following document
for more info:
I just added this to my code:
NSProcessInfo *pi = [ [ NSProcessInfo alloc ] init ];
NSString *d = [ pi hostName ];
On 12 Jun 2009, at 08:58, Graham Cox wrote:
On 12/06/2009, at 4:24 PM, Gerriet M. Denkmann wrote:
On 11 Jun 2009, at 18:55, Graham Cox wrote:
On 12/06/2009, at 2:08 AM, Arun wrote:
Hi All,
Is there any API in cocoa which can be used to fetch computer name
which is
getting displayed in
Hi Arun,
How about -[NSProcessInfo hostname]? Check the following document for
more info:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSProcessInfo_Class/Reference/Reference.html
Regards,
-- Tito
On Jun 11, 2009, at 11:58 PM, Graham Cox wrote:
On 12/06/20
On 12/06/2009, at 4:24 PM, Gerriet M. Denkmann wrote:
On 11 Jun 2009, at 18:55, Graham Cox wrote:
On 12/06/2009, at 2:08 AM, Arun wrote:
Hi All,
Is there any API in cocoa which can be used to fetch computer name
which is
getting displayed in Finder?
I'm not sure if there's a better way
On 11 Jun 2009, at 18:55, Graham Cox wrote:
On 12/06/2009, at 2:08 AM, Arun wrote:
Hi All,
Is there any API in cocoa which can be used to fetch computer name
which is
getting displayed in Finder?
I'm not sure if there's a better way, but you can use the Gestalt
function with the gestaltUs
Arun wrote:
Is there any API in cocoa which can be used to fetch computer name
which is
getting displayed in Finder?
CSCopyMachineName
-- GG
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderato
You can use the System Configuration framework to retrieve the computer name:
NSString *computerName =
[(NSString*)SCDynamicStoreCopyComputerName(NULL, NULL) autorelease];
-Sidney
On Thu, Jun 11, 2009 at 12:08 PM, Arun wrote:
> Hi All,
>
> Is there any API in cocoa which can be used to fetch co
On 12/06/2009, at 2:08 AM, Arun wrote:
Hi All,
Is there any API in cocoa which can be used to fetch computer name
which is
getting displayed in Finder?
I'm not sure if there's a better way, but you can use the Gestalt
function with the gestaltUserVisibleMachineName selector.
--Graham
Hi All,
Is there any API in cocoa which can be used to fetch computer name which is
getting displayed in Finder?
Thanks
Arun
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Co
16 matches
Mail list logo