// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (C) Production Robots Engineering Ltd
// robots@enterprise.net
//
//
//  MODULE:   Loadcell.h
//
//  PURPOSE:
//    Contains declarations for use by applications and other DLLs that
//    link to Loadcell.dll with Loadcell.lib



#ifndef INC_LOADCELL_H
#define INC_LOADCELL_H

#include <windows.h>

#define DLLIMPORT __declspec(dllimport)

DLLIMPORT BOOL WINAPI LCICClose(HANDLE);
DLLIMPORT HANDLE WINAPI LCICOpen(LPSTR);
DLLIMPORT BOOL WINAPI LCICRead(HANDLE, PFLOAT);
DLLIMPORT BOOL WINAPI LCICInit(HANDLE);
DLLIMPORT BOOL WINAPI LCICDone(HANDLE);
DLLIMPORT BOOL WINAPI LCICPoll(HANDLE, PFLOAT);
DLLIMPORT BOOL WINAPI LCICReadDigitalOutputs(HANDLE, PDWORD);
DLLIMPORT BOOL WINAPI LCICWriteDigitalOutputs(HANDLE, DWORD);
DLLIMPORT BOOL WINAPI LCICReadDigitalInputs(HANDLE, PDWORD);
DLLIMPORT BOOL WINAPI LCICSetup(HWND, LPSTR);
DLLIMPORT BOOL WINAPI SpeakerClick(HANDLE);


// private error codes returned by GetLastError if LCICOpen fails
#define LCIC_ERR_FIRST					0xE0000100
#define LCIC_ERR_CHECK_STRING_NOT_FOUND 0xE0000101
#define LCIC_ERR_TRANSMIT_FAILED		0xE0000102
#define LCIC_ERR_RAM_ERROR				0xE0000103
#define LCIC_ERR_A2D_ERROR				0xE0000104
#define LCIC_ERR_X244_ERROR				0xE0000105
#define LCIC_ERR_NEED_CAL_AND_PARAMS	0xE0000106

#endif  // INC_DLLSKEL_H
