realbasic-nug
[Top] [All Lists]

Re: Passing ByRef to Dylib

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Passing ByRef to Dylib
From: James Mullins <rblists at tpg dot com dot au>
Date: Wed, 31 Aug 2005 22:26:51 +1000
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <0DB839F2-7234-421F-9F4D-6B548F3DF879 at tpg dot com dot au> <eb8fc193050831021825d8a560 at mail dot gmail dot com> <c7940e2050831044118aea7f3 at mail dot gmail dot com>
Next one ;)

How about passing a Vector3D?
Do I need to pass individual integers or can I pass an array?

Best,

James



On 31/08/2005, at 9:41 PM, Jonathan Johnson wrote:

On 8/31/05, dda <headspin at gmail dot com> wrote:

In RB:
Declare Sub testProc Lib libLocation (ByRef d As Double)
Dim d As Double

testProc(d)

In XCode:
void testProc(float *d) {


However, a double should be passed byref as "double *d". The C 'float'
type is equivalent to REALbasic's single type.


On 8/31/05, James Mullins <rblists at tpg dot com dot au> wrote:

Is there much overhead in the transfer between the Dylib and RB?  Is
it worth converting relatively small Methods over or will any
performance gains be lost in the transfer?


For a regular declare, it's just like any other function call.

HTH,
Jon


--
Jonathan Johnson
REAL Software, Inc.
_______________________________________________
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>




_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>