• 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: Determine architecture of a running application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine architecture of a running application


  • Subject: Re: Determine architecture of a running application
  • From: danchik <email@hidden>
  • Date: Fri, 22 Jul 2011 12:19:04 -0700

what guarantee is there that pligin would be loaded of the same architecture and not proxied through the PluginHost?

There might be another issue now, I think safari 5.1 (even when ran in 32bit) now loads the plugins in another process through com.apple.WebKit.PluginProcess instead of loading them in the same process as Safari as it used to before the 5.1 :( In which case nothing wont help since the plugin in question expects to operate in the same process as the Safari.




----- Original Message ----- From: "Ken Thomases" <email@hidden>
To: "danchik" <email@hidden>
Cc: <email@hidden>
Sent: Thursday, July 21, 2011 10:57 PM
Subject: Re: Determine architecture of a running application



On Jul 21, 2011, at 11:34 PM, danchik wrote:

Hello, how can one determine if the currently running app is 32bit or 64

Specifically:

I have a 32 bit plugin compiled for 10.5+ and it needs to know if it was loaded by 32bit or 64bit Safari

You can move this test to compile time. After all, only that variant of your universal binary that was compiled as 64-bit will be loaded by a 64-bit process, and ditto for 32-bit.


So, in your code do:

#ifdef __LP64__
// 64-bit code
#else
// 32-bit code
#endif

If you really want, you can embody this in a function like:

static inline BOOL is64Bit(void)
{
#ifdef __LP64__
   return TRUE;
#else
   return FALSE;
#endif
}

Cheers,
Ken


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Determine architecture of a running application
      • From: Jens Alfke <email@hidden>
References: 
 >Determine architecture of a running application (From: danchik <email@hidden>)
 >Re: Determine architecture of a running application (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Determine architecture of a running application
  • Next by Date: Re: Determine architecture of a running application
  • Previous by thread: Re: Determine architecture of a running application
  • Next by thread: Re: Determine architecture of a running application
  • Index(es):
    • Date
    • Thread