UsbAdc11SetDo in Delphi 7

Forum for discussing PicoLog
Post Reply
Guest

UsbAdc11SetDo in Delphi 7

Post by Guest »

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
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

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

Post Reply