On May 11, 2006, at 2:36 PM, Norman Palardy wrote:


On May 11, 2006, at 10:29 AM, Charles Yeomans wrote:


They aren't; here's a port.

Function IsRosetta() as Boolean
Soft Declare Function sysctl Lib "System.framework" (p1 as Ptr, p2 as Integer, p3 as Ptr, ByRef p4 as Integer, p5 as Integer, p6 as Integer) as Integer

  Const CTL_HW = 6
  Const HW_MODEL = 2
  Const Null  = 0

  dim mib as new MemoryBlock(8)
  mib.Long(0) = CTL_HW          
  mib.Long(4) = HW_MODEL

  dim model as new MemoryBlock(32)
  dim len as Integer = model.Size

  dim theResult as Integer = sysctl(mib, 2, model, len, Null, 0)
Return (theResult = 0) and (len = 9 and StrComp(model, "PowerMac", 0) = 0)
End Function

Perhaps some of you could test this on your machines.

Interestingly enough on my MacBook Pro model holds "PowerMac"

No Gestalt selector that tells this any more ?
"mach" used to say what machine, cput and cpuf used to tell type and family

What does this yield for anyone else ?
On my Windows machine, b is false so it gives no cpu family

  dim b as boolean
  dim resp as Integer

  b=System.gestalt("cpuf",resp)

  If b then

    msgbox "family type = " + format(resp,"-#")

  End if


_______________________________________________
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