Re: Current process
Re: Current process
- Subject: Re: Current process
- From: Nathan Day <email@hidden>
- Date: Tue, 11 Jun 2002 18:17:12 +0930
Using the process manager and LaunchServices, something like this
ProcessSerialNumber theProccessSerialNumber;
FSSpec theSpec;
ProcessInfoRec theInfoRec;
FSRef theRef;
LSItemInfoRecord theItemInfo;
GetFrontProcess( &theProccessSerialNumber );
theInfoRec.processInfoLength = sizeof(ProcessInfoRec);
theInfoRec.processName = NULL;
theInfoRec.processAppSpec = &theSpec;
GetProcessInformation( & theProccessSerialNumber, &theInfoRec );
FSpMakeFSRef ( &theSpec, &theRef );
LSCopyItemInfoForRef( &theRef, kLSRequestBasicFlagsOnly, & theItemInfo);
return (theItemInfo & kLSItemInfoAppPrefersClassic) != 0;
just about all of these functions return a value of noErr if they
succeed so you should really check that
On Tuesday, June 11, 2002, at 03:34 AM, Renaud Boisjoly wrote:
Hullo!
I'm looking for a way to determine if the frontmost app is a Classic
app or not. I've looked in the documentation and in the archives, but I
cannot find mention of this. Any attempt to get info on the current
process does only just that, give me info on my own process.
I just want to be able to tell if the frontmost window is from a
classic app or not
thanks for any pointers!
_______________________________________________
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.