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

Home » Public Forums » archive » Re: 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
Re: another call_external newbie [message #11350 is a reply to message #11348] Sun, 22 March 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Donald Green (dfg@ai.mit.edu) writes:

> 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....

The most common reason Call_External fails is that the
C program expects 4 byte integers and it gets passed 2
byte integers. I suspect that is what is going on here.

Try setting the "board" variable to 34L and see if you
don't have better luck. Remember, default IDL integer
variables are SHORT integers in other programming
languages.

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Removing CRLF from a String
Next Topic: Programming Books Available Again

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

Current Time: Sun Oct 19 20:40:28 PDT 2025

Total time taken to generate the page: 1.84108 seconds