"C-pointers in FFI" question

From: Genady Veytsman <gena0411_at_yahoo.com>
Date: Wed, 18 Apr 2001 08:50:39 -0700 (PDT)

Hello,

I can't figure out how to use C-pointers in Stk.
Could anybody help me?

Here is an example:

Let's say there is C function "printhello" in library
"libhello" and it returns pointer wich was declared in
C as:

double* pSignal;

In STk script I write:

(define-external phello()
  :return-type :dynamic-ptr
  :entry-name "printhello"
  :library-name "libhello"
)

(define p (phello))

Now "p" contains all the data I need, but
how do I access array's elements?

Thanks in advance
   Genady Veytsman












__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
Received on Thu Apr 19 2001 - 16:31:42 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST