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

Home » Public Forums » archive » Help! pointer address return using idl_tools DLM (EXTPROC_DEFINE)
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: Help! pointer address return using idl_tools DLM (EXTPROC_DEFINE) [message #38602 is a reply to message #38476] Fri, 12 March 2004 03:15 Go to previous message
mw vogel is currently offline  mw vogel
Messages: 3
Registered: February 2003
Junior Member
anand wrote:

> Hi
>
> I'm a newbie to Idl. I downloaded the idl_tools DLM library from Ronn
> Kling's website http://www.rlkling.com. I"m trying to access from idl
> the address of a float pointer returned by a function in C++.
> In my C++ program I have:
>
> float* cppfunc(int); //not part of any class
>
> I get the output of the C++ program as sample.dll file using visual
> studio 6.0
>
> In Idl I correspondingly use the call:
>
> addr = EXTPROC_DEFINE("idlfunc", "sample.dll", "cppfunc",
> "p(i)",/CDECL)
> ;to get the address of the pointer since the documentation says " If
> ;the return value is a pointer, the
> ;memory address returned by the function will be placed in
> ;an IDL unsigned long and returned to the IDL application."
>

Ok, my 2 cents :

This _DEFINE call only sets up an internal IDL command that connects to
your function in your DLL. To get valid output, you should actually use
the call. Probably something along the lines of p = idlfunc(0) . Then
use the DEREF to get the values from p.
[Message index]
 
Read Message
Read Message
Previous Topic: cw_field: checking entries
Next Topic: Maximum Likelihood processing time

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

Current Time: Fri Oct 10 09:33:21 PDT 2025

Total time taken to generate the page: 0.08185 seconds