#ifdef DLL_API
#else
#define DLL_API extern "C" _declspec(dllimport)
#endif



////////////////////////////////////////////////////////////////////////////////////////////////////////////

typedef struct _TRIGGER
{
	BOOL EdgeTerm;
	int EdgeSignal;
	int EdgeRaise;
	BOOL RangeTerm;
	unsigned __int64 RangeSh;
	unsigned __int64 RangeMin;
	unsigned __int64 RangeMax;
	unsigned char RangeMode;          
	BOOL TimeTerm;
	unsigned __int64 TimeMin;
	unsigned __int64 TimeMax;
	unsigned char TimeMode;

	BOOL EquTerm;
	unsigned __int64 EquSh;
	unsigned __int64 EquValue;
	unsigned char EquMode;
}TRIGGER,*PTRIGGER;

DLL_API BOOL __stdcall LAReadEE(int index,DWORD offset,LPWORD lpvalue);

DLL_API BOOL __stdcall SearchLA(LPDWORD numDevs, long* usbArray);

DLL_API BOOL __stdcall LASetSampleRate(int index,unsigned char rate,unsigned char compress,unsigned char IsExtClk);

DLL_API BOOL __stdcall LASetThresholdVolt(int index,float voltA,float voltB);

DLL_API unsigned __int64 __stdcall LASetPreTrigger(int index,unsigned char preTrigger);

DLL_API BOOL __stdcall LASetTrigger(int index,unsigned char triggerMode,PTRIGGER triggerA,PTRIGGER triggerB,int sampleRate);

DLL_API int __stdcall LAReadLogic(int index,unsigned __int64* Dat,BOOL *finish);

DLL_API BOOL __stdcall LATrigPre(int index, int trigNow, int type, BOOL compress, int rate, double prt);

DLL_API BOOL __stdcall LATrigLast(int index, unsigned __int64* buffer);

DLL_API void __stdcall LAGetLevel(unsigned __int64* buffer, ULONG nLen,unsigned char* pLevel, int signal);

DLL_API float __stdcall LAXiuZheng(int index, float fThresholdVolt, int nABFlag);
