On Dec 9, 2006, at 1:51 PM, James H.Membrez wrote:
Could someone tell me what is wrong with this Declare code? It
consistently returns "0".
I'm using RB 5.5.5, MacOS 10.3.9.
(I tried it in RB2006 r4 and got the same result. I also tried the
"System.IsFunctionAvailable" routine, which returned false,
something I find hard to believe.)
dim m As MemoryBlock
m = newMemoryBlock(8)
#if TargetMachO
Declare Function AudioGetCurrentHostTime Lib "/System/Library/
Frameworks/CoreAudio.frameworks/HostTime"() As MemoryBlock
m = AudioGetCurrentHostTime()
#endif
MsgBox str(m.UInt64DoubleMBS(0)) //use MBS plugin function to
convert 64 bit integer to double
AudioGetCurrentHostTime returns a UInt64, not a pointer to a UInt64.
The following appears to work.
Soft Declare Function AudioGetCurrentHostTime Lib
"CoreAudio.framework" () as UInt64
Charles Yeomans
_______________________________________________
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>