returning pointers and simple types from DLM functions [message #32516] |
Thu, 10 October 2002 04:09 |
Sidney Cadot
Messages: 7 Registered: October 2002
|
Junior Member |
|
|
Hi all,
I am currently trying to program an IDL DLM that will provide a link to a
previously-written C library. This is a first for me; while I have studied
the IDL 5.4 external development guide quite extensively, I cannot find
answers to the following two questions:
(1) the C library yields opaque pointers as results of some functions that I
need to pass back to IDL, in order for the IDL program to be able later on
to pass these back into other library routines. Question: what type should I
use to represent pointers (IDL_PTR or IDL_MEMINT) and how do I make sure my
code works properly on both 32- and 64-bit platforms?
(2) How do I construct an IDL_VPTR when my function should simply return a
basic type, (say, an IDL_INT)? Should I use IDL_Gettmp() for this, and if
so: should I be setting the "type" and/or "flags" field myself? This may
seem quite silly to ask, but I didn't find an example of this or explicit
instructions in the external development guide.
Best regards,
Sidney Cadot
Science and Technology BV
The Netherlands
|
|
|