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

Home » Public Forums » archive » Call_external with V C++
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Call_external with V C++ [message #25104] Thu, 17 May 2001 10:53
<lalassne is currently offline  <lalassne
Messages: 3
Registered: May 2001
Junior Member
Hi, I am using IDL's call_external function with a DLL I created using
visual c++. I am having difficulties because the parameters I am passing
are not coming through properly. I tried to pattern my code based on the
examples in the IDL external folder:

IDL code:

dll="C:\WINDOWS\Desktop\TomoInvDLL\Debug\TomoInvDLL.dll"

status = call_external(dll,'GenCellsSIRT', sourceFileName, recFileName, $
initvel, cellLength)

C++ code:

#include "export.h"
#include "defs.h"
void IDL_STDCALL GenCellsSIRT(int argc, void *argv[])

{
.
.
float * vel;
float * cellLength;
IDL_STRING * fn_src_loc;
IDL_STRING * fn_rec_loc;

fn_src_loc=(IDL_STRING *) argv[0];
fn_rec_loc=(IDL_STRING *) argv[1];
vel = (float *) argv[2];
cellLength=(float * ) argv[3];

.
.
.
}
The problem is that the vel and cellLength values are not received
properly by the C++ code. Basically I get garbage when I try to
dereference them and print them out or use them. Any ideas?

Also does anyone know how to keep IDL from keeping the DLL file open. I
have to close the program each time after I run it so that I can compile
the DLL.




- Lisa A. Lassner


------------------------------------------------------------ -------------------
"We cannot do great things on this earth. We can only do small things
with great love."

-Mother Teresa
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: clust_wts
Next Topic: busted (was Re: floor() function definition)

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

Current Time: Wed Oct 08 19:21:33 PDT 2025

Total time taken to generate the page: 0.00545 seconds