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 #11348 is a reply to message #11347] Sun, 22 March 1998 00:00 Go to previous messageGo to previous message
hdsfkj is currently offline  hdsfkj
Messages: 12
Registered: March 1998
Junior Member
That was it all right..... Thank you.

David Fanning wrote:

> 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: Sat Oct 11 18:16:38 PDT 2025

Total time taken to generate the page: 0.88291 seconds