realbasic-nug
[Top] [All Lists]

Re: Passing a varargs to a Declare statement?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Passing a varargs to a Declare statement?
From: Tim Jones <tjmac at tolisgroup dot com>
Date: Thu, 29 Mar 2007 15:29:24 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <CEA397F1-AE0A-4490-BEBE-C01F3D5BF73E at tolisgroup dot com> <41534CA5-583B-45F8-A886-5B5B2E5A1C25 at declareSub dot com>
On Mar 29, 2007, at 3:01 PM, Charles Yeomans wrote:

>
> On Mar 29, 2007, at 5:48 PM, Tim Jones wrote:
>
>> Hi Folks,
>>
>> I've a need to call a function from a library that uses a variable
>> number of arguments (vararg ... ) to the last part of the function
>> call.  The LR and User Guides are very sparse on using Declares.  The
>> first thing that I thought of was creating an array for the args and
>> then passing the array ByRef, but that doesn't seem to work.  How
>> should I go about doing this?
>
>
> If you know the number and types of arguments, then you can declare
> the function for that signature.  Otherwise, it might be possible to
> do an all-in-one declaration by unrolling the macros in the
> appropriate version of stdarg.h, but I've not tried that.

Hmmm, I am in control of what's being passed, so I could just preset  
the number of arguments and not worry about varargs at all.  Hadn't  
thought of that because I was thinking about just the general call  
for a non-specific purpose.

Thanks,

Tim
--
Tim Jones
tjmac at tolisgroup dot com


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


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