UsbAdc11SetDo in Delphi 7

Forum for discussing PicoLog
Post Reply

UsbAdc11SetDo in Delphi 7

Post by Guest » Mon May 28, 2007 9:16 pm

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

User avatar
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer » Tue May 29, 2007 2:45 pm


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

Post Reply