// Copyright (C) Production Robots Engineering Ltd
// martinl@prel.co.uk
//
//  MODULE:   Lc4hsLink.h
//
//  PURPOSE:
//    Contains declarations for use by applications and other DLLs that
//    link to Lc4hs.dll by compiling and linking Lc4hsLink.C.


#ifndef INC_LC4HSLINK_H
#define INC_LC4HSLINK_H

#include <windows.h>
#include "lc4hsmsg.h"

extern BOOL (WINAPI* Lc4hsSetup)(HWND hWnd, LPSTR DeviceName, BOOL CheckAddress);
extern HANDLE (WINAPI* Lc4hsOpen)(LPSTR DeviceName);
extern BOOL (WINAPI* Lc4hsInit)(HANDLE Card);
extern BOOL (WINAPI* Lc4hsFinish)(HANDLE Card);
extern BOOL (WINAPI* Lc4hsGetCardStatus)(HANDLE Card, BOOL *CardStatus);
extern BOOL (WINAPI* Lc4hsGetCardVersion)(HANDLE Card, DWORD *CardVersion);
extern BOOL (WINAPI* Lc4hsGetChannelStatus4)(HANDLE Card, BOOL *Status);
extern BOOL (WINAPI* Lc4hsGetChannelStatus)(HANDLE Card, DWORD Channel, BOOL *Status);
extern BOOL (WINAPI* Lc4hsGetZeroAD4)(HANDLE Card, DWORD *ZeroAD);
extern BOOL (WINAPI* Lc4hsGetZeroAD)(HANDLE Card, DWORD Channel, DWORD *ZeroAD);
extern BOOL (WINAPI* Lc4hsGetCurrentWeight4)(HANDLE Card, FLOAT *CurrentWeight);
extern BOOL (WINAPI* Lc4hsGetCurrentWeight)(HANDLE Card, DWORD Channel, FLOAT *CurrentWeight);
extern BOOL (WINAPI* Lc4hsPollCurrentWeight4)(HANDLE Card, FLOAT *CurrentWeight);
extern BOOL (WINAPI* Lc4hsPollCurrentWeight)(HANDLE Card, DWORD Channel, FLOAT *CurrentWeight);
extern BOOL (WINAPI* Lc4hsGetCurrentAD4)(HANDLE Card, DWORD *CurrentAD);
extern BOOL (WINAPI* Lc4hsGetCurrentAD)(HANDLE Card, DWORD Channel, DWORD *CurrentAD);
extern BOOL (WINAPI* Lc4hsPollCurrentAD4)(HANDLE Card, DWORD *CurrentAD);
extern BOOL (WINAPI* Lc4hsPollCurrentAD)(HANDLE Card, DWORD Channel, DWORD *CurrentAD);
extern DWORD (WINAPI* Lc4hsGetDigitalOutput)(HANDLE Card, DWORD BitNo, BOOL *Value);
extern BOOL (WINAPI* Lc4hsSetDigitalOutput)(HANDLE Card, DWORD BitNo, BOOL Value);
extern BOOL (WINAPI* Lc4hsGetDigitalInput)(HANDLE Card, DWORD BitNo, BOOL *Value);
extern BOOL (WINAPI* Lc4hsReadIO)(HANDLE Card, DWORD *IOData);
extern BOOL (WINAPI* Lc4hsGetErrorMsg)(DWORD Code, LPSTR lpBuffer, DWORD nSize);

HINSTANCE LoadLc4hsLibrary(void);
VOID UnloadLc4hsLibrary(HINSTANCE Instance);

#endif  // INC_LC4HSLINK_H
