unit Loadcell;
interface
uses
  Windows;

{ private error codes returned by GetLastError if LCICOpen fails}
const
  LCIC_ERR_FIRST                  = $E0000100;
  LCIC_ERR_CHECK_STRING_NOT_FOUND = $E0000101;
  LCIC_ERR_TRANSMIT_FAILED        = $E0000102;
  LCIC_ERR_RAM_ERROR              = $E0000103;
  LCIC_ERR_A2D_ERROR              = $E0000104;
  LCIC_ERR_X244_ERROR             = $E0000105;
  LCIC_ERR_NEED_CAL_AND_PARAMS    = $E0000106;


function LCICOpen(DeviceName: LPSTR): THandle; stdcall;
function LCICClose(Card: THandle): BOOL; stdcall;
function LCICInit(Card: THandle): BOOL; stdcall;
function LCICDone(Card: THandle): BOOL; stdcall;
function LCICRead(Card: THandle; var Res: Single): BOOL; stdcall;
function LCICPoll(Card: THandle; var Res: Single): BOOL; stdcall;
function LCICReadDigitalOutputs(Card: THandle; var Res: DWORD): BOOL; stdcall;
function LCICWriteDigitalOutputs(Card: THandle; Res: DWORD): BOOL; stdcall;
function LCICReadDigitalInputs(Card: THandle; var Res: DWORD): BOOL; stdcall;
function LCICSetup(Wnd: HWND; DeviceName: LPSTR): BOOL; stdcall;
function SpeakerClick(Card: THandle): BOOL; stdcall;

implementation
const
  DLLName = 'Loadcell.dll';

function LCICOpen; external DLLName;
function LCICClose; external DLLName;
function LCICInit; external DLLName;
function LCICDone; external DLLName;
function LCICRead; external DLLName;
function LCICPoll; external DLLName;
function LCICReadDigitalOutputs; external DLLName;
function LCICWriteDigitalOutputs; external DLLName;
function LCICReadDigitalInputs; external DLLName;
function LCICSetup; external DLLName;
function SpeakerClick; external DLLName;

end.
