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: Charles Yeomans <charles at declareSub dot com>
Date: Thu, 29 Mar 2007 18:01:31 -0400
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>
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.

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