UsbAdc11SetDo in Delphi 7

 
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoLog
Author Message
Guest






PostPosted: Mon May 28, 2007 9:16 pm    Post subject: UsbAdc11SetDo in Delphi 7 Reply with quote

Hi I'm having trouble using UsbAdc11SetDo in Delphi 7 my syntax is UsbAdc11SetDo(nHandle, 1); where nHandle is the handle assigned to the device on opening it. I get an access violation error which disappears if I comment out the line. Any ideas what I'm doing wrong? The function is declared as follows: function UsbAdc11SetDo (handle : short; do_value : short) : short; stdcall; external 'usbadc11.dll';
Thanks in anticipation
James Seddon
Back to top
markspencer
Site Admin
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Tue May 29, 2007 2:45 pm    Post subject: Reply with quote

Hi,

I thought that a short should be expressed as a smallInt in delphi, you coud try this:

function UsbAdc11SetDo (handle : smallInt, do_value : smallInt ) : smallint;
{$IFDEF WIN32} stdcall; external 'UsbAdc11.dll'{$ENDIF}

Best regards,
Mark S
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoLog
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group