• 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: Which Operating System Version and Machine?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which Operating System Version and Machine?


  • Subject: Re: Which Operating System Version and Machine?
  • From: Lorenzo Puleo <email@hidden>
  • Date: Thu, 09 May 2002 13:47:49 +0200

>> Hi,
>> when my application is running, where should I get the version of the
>> current MacOS X operating system?
>> Which APIs do that?

> Have a look at the docs for gestalt as a starting point. This is an old
> toolbox thing - now Carbon.
> Sorry it's vague, don't know how to do it in Cocoa.

OK, I took a routine from my old Carbon application
and it works well, I can get the operating system version
I hope this will work for all the next MacOS X releases...

---------------
signed long systemVersion;
Gestalt('sysv', &systemVersion);
---------------

and I can decide on that value, as following

if (systemVersion < 0x1012){
// do something here
}


Now, how could I transform that signed long in a NSString like
@"10.1.2"?
Assistance is appreciated.

--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
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.

  • Prev by Date: Re: OmniExpat?
  • Next by Date: Re: Slighty OT: Non-Cocoa Notifications
  • Previous by thread: Re: Which Operating System Version and Machine?
  • Next by thread: SSL Cocoa API anywhere???
  • Index(es):
    • Date
    • Thread