#pragma once

#define DLL_API __declspec(dllexport)

#ifdef __cplusplus
extern "C" {
#endif

typedef int(*ReceivePosData)(const char *pData, int pDataLength, unsigned char cResult);

DLL_API bool OpenDevice(int p_nVid, int p_nPid);
DLL_API bool CloseDevice();
DLL_API bool WriteUsb(LPCVOID lpBuffer, DWORD dwSize);
DLL_API int  SetCallback(ReceivePosData pf);
DLL_API bool GetDeviceSn(char *pSn, int *pSnLength);
DLL_API bool ConnectStaus();
DLL_API bool SetReceiveTimeOut(int nTimeOutMillisecond);
#ifdef __cplusplus
}
#endif