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 #29475 is a reply to message #29474] Tue, 26 February 2002 08:58 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
James Kuyper wrote:
>
> Mark Rivers wrote:
> ...
>
>> 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;
>
> Which points out he importance of using "#include export.h" to create
> the typedef, rather than copying the typedef into your own code.

I agree to this and sure this was the main problem.

The second problem comes from this two lines.

strcpy(buf,path.s);
buf[path.slen]='\0';

I have learned that I have to do:

buf[path.slen]='\0';
strcpy(buf,path.s);

regards
Reimar



--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======
[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 21:02:54 PDT 2025

Total time taken to generate the page: 0.16119 seconds