Jan Erik Moström <[EMAIL PROTECTED]> wrote:

> This must be one of the most commonly question asked but I 
> couldn't find the answer: How can I, at runtime, check if I'm 
> running on an Intel or a PowerPC machine?

At compile time:

#if targetpowerpc
// PPC
#elif targetx86
// X86
#endif

and detecting Rosetta:

Function IsRosetta() As boolean
  Const CTL_HW = 6
  Const HW_MODEL = 2
  
  dim mib,m as MemoryBlock
  
  mib=newMemoryBlock(8)
  mib.Long(0) = CTL_HW
  mib.Long(4) = HW_MODEL
  
  m=SystemControlMBS(mib)
  if m<>nil then
    if m.CString(0)="PowerMac" then
      Return true
    end if
  end if
End Function

with my plugins in version 7.

Gruß
Christian

-- 
Around eleven thousand functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v6.5. Now universal!
<http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to