comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: passing structures to CALL_EXTERNAL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: passing structures to CALL_EXTERNAL [message #17247] Sat, 18 September 1999 00:00
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <7rsd1p$2c3$1@cnn.Princeton.EDU>, jvkepner@muse.Princeton.EDU (Jeremy Kepner) writes:
> I would like to pass an IDL structure to a function written
> in C via CALL_EXTERNAL. Does anybody know how to do this.

I have done this in the past. This was back in IDL 3.5, using FORTRAN rather
than C, on VMS! I would be very surprised if it does not still work fine. It is
not officially supported, presumably because IDL may change the way it
represents structures internally in future releases.

An IDL structure is essentially the same as the equivalent C structure, and
CALL_EXTERNAL will simply pass a pointer to this structure to your C code.
IDL arrays in the structure are "in-line", i.e. the data itself is in the
structure, not a pointer to the data. However, for strings the structure
contains the string descriptor, not the string data itself. I don't know about
IDL objects, pointers, etc. since those were all added to IDL since I last used
CALL_EXTERNAL with structures. If you stick to scalers and arrays of numbers
you should be OK. Give it a try!

Mark Rivers
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Integration of IDL with Windows Applications ?
Next Topic: Suggestion for IDL6 -- variable declarations

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:03:04 PDT 2025

Total time taken to generate the page: 0.00578 seconds