Re: Which Operating System Version and Machine?
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.