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

Home » Public Forums » archive » another call_external newbie
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
another call_external newbie [message #11352] Sun, 22 March 1998 00:00
hdsfkj is currently offline  hdsfkj
Messages: 12
Registered: March 1998
Junior Member
Hi, I'm a c programmer trying to implement some IDL for device control.
I need help debugging a short IDL program that uses call_external to
access routines in a
dll written in C using VC++5.0 and IDL 5.0. Both code snippets appear
below. The problem seems to be
accessing data passed by reference. The Message statement returns
garbage but if I check
the value of 'board' in IDL after the call_external is executed it's
value is indeed 1. Why can I change
the value properly but not access it's value in the C routine? Thanks
for any help....

Donald Green
dfg@ai.mit.edu


pro test

PRINT, "This program tests CALL_EXTERNAL using test.dll"
value = 6.459
board = 34
lResult = CALL_EXTERNAL('c:\testidl\testidl.dll','test',board,value)
PRINT, "Test one complete."

end




LONG WINAPI test(LONG argc, LPVOID argv){

CHAR szMsg[256];
LPLONG argarray = (LPLONG) argv;
LPINT boardnum = (LPINT)argarray[0];
LPFLOAT val = (LPFLOAT)argarray[1];

sprintf(szMsg, "%i %f",*boardnum,*val);
MessageBox (NULL, (LPSTR)szMsg, (LPSTR)"Reply from test.dll",
MB_OK | MB_ICONINFORMATION);

*boardnum = 1;
return(1);

}
[Message index]
 
Read Message
Previous Topic: Default BUFSIZE
Next Topic: recursive tag_names

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

Current Time: Sun Oct 12 00:33:21 PDT 2025

Total time taken to generate the page: 1.44088 seconds