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: dda <headspin at gmail dot com>
Date: Wed, 31 Aug 2005 11:18:23 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ldoEr5PRd7pZgkvMbc17BELRpc89Qqx937ntyaAVxdYmjTo2F+yLDv/3s+eZ2jua/eqOt81vQl3HcBy2TtnpQ7dv7Xy4FCGOsVJIu935ssC6oWwgJd6eyvtzdjDpvdoB8DN2dAdS2gtMlA68ZgAz87Z9MVmkHfaf7Isx6t8KKlA=
References: <0DB839F2-7234-421F-9F4D-6B548F3DF879 at tpg dot com dot au>
In RB:
Declare Sub testProc Lib libLocation (ByRef d As Double)
Dim d As Double

testProc(d)

In XCode:
void testProc(float *d) {
    // do something
}

HTH

-- 
dda 
http://sungnyemun.org/

RBDeveloper Columnist, "Beyond the Limits"
http://rbdeveloper.com
Liste Française Solutions RB
http://www.solutionsrb.com/


On 8/31/05, James Mullins <rblists at tpg dot com dot au> wrote:
> Hi all,
> 
> Can someone help me with a method of passing ByRef to a Dylib
> 
> Basically I have a variable test (double) that I need to pass by ref
> to my Dylib.
> 
> I am new to writing Dylibs and they are easy and great to start
> simple projects with.
> 
> I am converting an old method across to C in an effort to increase
> program speed.
> 
> Any thoughts on how fast a C file (Dylib) will execute compared to
> inline RB code?
> 
> 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?
> 
> I hope all that makes sense,
> 
> Best,
> 
> James
_______________________________________________
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>