// 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:   LCICLink.h
//
//  PURPOSE:
//    Contains declarations for use by applications and other DLLs that
//    link to Loadcell.dll by compiling and linking LCICLink.C.


#ifndef INC_LCICLINK_H
#define INC_LCICLINK_H

#include <windows.h>

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

HINSTANCE LoadLoadcellLibrary(void);
VOID UnloadLoadcellLibrary(HINSTANCE Instance);

// 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_LCICLINK_H
