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

Home » Public Forums » archive » Re: Returning pointers from C DLL
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: Returning pointers from C DLL [message #12594] Tue, 25 August 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Simon Hall (shall@atm.ch.cam.ac.uk) writes:

> I need to write a dll that returns a pointer to an array of strings, ie
> I want to return a char** type.
>
> I can get it to return a single string using the /s_value keyword to
> call_external. How do I return an array of strings? I can't see any
> option to return a pointer.

I think you are misunderstanding how things get back
from Call_External. You want to pass the string array
as an *argument* to Call_External. It is better to think
of the return value of Call_External as a value that tells
you whether the function call was successful or not.

myStringArray = StrArr(10)
ok = Call_External('my.dll', 'fill_string', myStringArray)

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Printing PS Files on Windows Machines
Next Topic: Returning pointers from C DLL

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

Current Time: Fri Oct 10 21:51:20 PDT 2025

Total time taken to generate the page: 0.56165 seconds