Re: Current process
Re: Current process
- Subject: Re: Current process
- From: Renaud Boisjoly <email@hidden>
- Date: Tue, 11 Jun 2002 11:39:08 -0400
Hi again Nathan
It seems I always get a result of 0 from
(theItemInfo & kLSItemInfoAppPrefersClassic)
I tried using NSLog to show its value while SimpleText was running, but
it always says 0... am I missing something? Perhaps I'm using this
arong. What I did is the following:
- (BOOL)test {
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);
NSLog(@"Classic? %d",(theItemInfo.flags
&kLSItemInfoAppPrefersClassic));
return (theItemInfo.flags & kLSItemInfoAppPrefersClassic) != 0;
// return theResult;
}
Which always returns NO it seems...
thanks for all your help!
Renaud
On Tuesday, June 11, 2002, at 08:38 AM, Nathan Day wrote:
On Tuesday, June 11, 2002, at 09:58 PM, Renaud Boisjoly wrote:
return (theItemInfo & kLSItemInfoAppPrefersClassic) != 0;
This line should be
return (theItemInfo.flags & kLSItemInfoAppPrefersClassic) != 0;
_______________________________________________
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.