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

Home » Public Forums » archive » Re: call_external (IDL5.5)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: call_external (IDL5.5) [message #29494 is a reply to message #29493] Mon, 25 February 2002 06:56 Go to previous messageGo to previous message
Mark Rivers is currently offline  Mark Rivers
Messages: 49
Registered: February 2000
Member
Reimar Bauer <r.bauer@fz-juelich.de> wrote in message
news:3C7A252F.F64A3633@fz-juelich.de...
> Hi,
>
> I have a found a difference between CALL_EXTERNAL for IDL5.4.1 and
> IDL5.5. One of my routines crashes in idl5.5.
> Why? I don't know at the moment!
>
> I don't find a hint about changes for call_external.
>
> What is your experience?

There is one very important difference between CALL_EXTERNAL in IDL 5.5 and
previous versions, which has to do with how IDL strings are passed. The
following code is from "export.h" in IDL 5.5.
********************************************
typedef int IDL_STRING_SLEN_T;
#define IDL_STRING_MAX_SLEN 2147483647


typedef struct { /* Define string descriptor */
IDL_STRING_SLEN_T slen; /* Length of string, 0 for null */
short stype; /* type of string, static or dynamic */
char *s; /* Addr of string */
} IDL_STRING;
********************************************
Note that "slen" is of type "int". In previous versions it was of type
"short". Thus, if your external C code is being passed strings it needs to
be changed for IDL 5.5.

I worked around this problem, making a single DLL that will work for any IDL
version, by changing my IDL wrapper routines and C code to never pass
strings, but convert everything to byte arrays before CALL_EXTERNAL, and
back to strings after CALL_EXTERNAL.

Mark Rivers
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL books?
Next Topic: Re: Satellite orbit procedure

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

Current Time: Fri Oct 10 06:16:48 PDT 2025

Total time taken to generate the page: 1.27876 seconds