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


//////////////////////////////////////////////////////////
//Search...
DLL_API int WINAPI dmmSearch();
//Read 
DLL_API USHORT WINAPI dmmGetData(int index,PDMM_DATA data);
//Set
DLL_API USHORT WINAPI dmmSetType(int index,short nType);
DLL_API USHORT WINAPI dmmSetVDCAUTOV(int index);
DLL_API USHORT WINAPI dmmSetVACAUTOV(int index);
DLL_API USHORT WINAPI dmmSetADCAUTOMA(int index);
DLL_API USHORT WINAPI dmmSetAACAUTOMA(int index);
DLL_API USHORT WINAPI dmmSetVDCMANUAL60MV(int index);
DLL_API USHORT WINAPI dmmSetVACMANUAL60MV(int index);
DLL_API USHORT WINAPI dmmSetADCMANUAL60MA(int index);
DLL_API USHORT WINAPI dmmSetAACMANUAL60MA(int index);
DLL_API USHORT WINAPI dmmSetOHMAUTO(int index);
DLL_API USHORT WINAPI dmmSetOHMMANUAL600(int index);
DLL_API USHORT WINAPI dmmSetRel(int index);
DLL_API USHORT WINAPI dmmExitRel(int index);
DLL_API USHORT WINAPI dmmSetVDCManualDIV(int index, short nDIV);
DLL_API USHORT WINAPI dmmSetVACManualDIV(int index, short nDIV);
DLL_API USHORT WINAPI dmmSetADCManualDIV(int index, short nDIV);
DLL_API USHORT WINAPI dmmSetAACManualDIV(int index, short nDIV);
DLL_API USHORT WINAPI dmmSetOHMDIV(int index,short nDIV);
DLL_API USHORT WINAPI dmmSetADC10A(int index);
DLL_API USHORT WINAPI dmmSetAAC10A(int index);
//Draw
DLL_API void WINAPI dmmDrawValue(HDC hDC,int x, int y,BOOL bOverflow,float fValue,int nDotPos,COLORREF clr);
DLL_API void WINAPI dmmDrawUnits(HDC hDC,int x,int y, int nUnit,int nUnitType,COLORREF clr);
DLL_API void WINAPI dmmDrawBar(HDC hDC,int x, int y,short nDMMBar,short nBarSign,COLORREF clr);
DLL_API void WINAPI dmmDrawMenuAutoManual(HDC hDC,int x, int y, short nDMMType, short nDMMMode,BOOL bAmA,COLORREF clr);
DLL_API void WINAPI dmmDrawMenuACDC(HDC hDC,int x, int y,short nDMMACDC,COLORREF clr);
DLL_API void WINAPI dmmDrawGrid(HDC hDC,int nLeft,int nTop,int nRight,int nBottom,short nCurDIV,long nHoriDIV,short nDMMType,short nDMMDCAC,COLORREF clr);
DLL_API void WINAPI dmmDrawMenuRange(HDC hDC,int x, int y,short nDMMType,short nDMMMode,short nDMMDCAC,BOOL bDMMAmA,short nDMMRange,COLORREF clr);
DLL_API void WINAPI dmmDrawRel(HDC hDC,int x, int y,BOOL bRel,float fValue,int nDotPos,int nUnit,int nUnitType,COLORREF clr);
DLL_API void WINAPI dmmDrawDiode(HDC hDC,int x, int y,short nDMMType,COLORREF clr);
DLL_API void WINAPI dmmDrawCAP(HDC hDC,int x, int y,short nDMMType,COLORREF clr);
DLL_API void WINAPI dmmDrawCONTI(HDC hDC,int x, int y,short nDMMType,COLORREF clr);
DLL_API double WINAPI FormatRecordData(int nUnit,int nUnitType,float fValue);
DLL_API void WINAPI dmmDrawWave(HDC hDC,int nLeft,int nTop,int nRight,int nBottom,short nDMMType,short nDCAC,double* pData,ULONG nLen, double dbScale,COLORREF clr);
DLL_API int WINAPI dmmFormatDataToStr(TCHAR* str,int nUnit,int nUnitType, float fValue);
DLL_API void WINAPI dmmDrawRun(HDC hDC,int x, int y, BOOL bRun);
DLL_API void WINAPI SaveToBmp(HWND hWnd,LPCTSTR lpstr);

//
DLL_API BOOL WINAPI OpenCOM(int index,int nCOMPort);
DLL_API void WINAPI CloseCOM(int index);

DLL_API short WINAPI DmmIsDevConnect(int index,int nCOMPort);