Test and Measurement Forum

UsbAdc11SetDo in Delphi 7

Forum for discussing PicoLog

UsbAdc11SetDo in Delphi 7

Postby 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

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

Return to PicoLog

Who is online

Users browsing this forum: No registered users and 0 guests