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

Home » Public Forums » archive » Re: CALL_EXTERNAL and memory allocation
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 and memory allocation [message #29682 is a reply to message #29680] Mon, 11 March 2002 08:43 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Michael Zingale wrote:

> I typically do something like the following:
>
>
> in IDL:
>
> string = ' '
>
> ierr = call_external('lib.so', 'read_string', string)
>
>
> and in C:
>
> IDL_STRING* string = (IDL_STRING *) argv[0];
>
> then fill string.s with the string.

Are you referring to the 'argv' that appears as a parameter in a C
main()? That's not necessarily legal. You need to first make sure that:

strlen(argv[0]) > sizeof(IDL_STRING)

Otherwise, you many be overwriting memory that you don't have permission
to access.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Grayscale AND Binary Image
Next Topic: MODIS L1B - 250m

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

Current Time: Sat Oct 11 18:48:36 PDT 2025

Total time taken to generate the page: 0.72286 seconds