1,486
社区成员
发帖
与我相关
我的任务
分享
Option Explicit
#If Not GENERIC_I_NO_GUI Then
'int MERCURY_FUNC_DECL Mercury_InterfaceSetupDlg(const char* szRegKeyName);
Private Declare Function Mercury_InterfaceSetupDlg Lib "PI_Mercury_GCS_DLL.dll" (ByVal szRegKeyName As String) As Long
#End If
'int MERCURY_FUNC_DECL Mercury_ConnectRS232(int port, int baudrate);
Private Declare Function Mercury_ConnectRS232 Lib "PI_Mercury_GCS_DLL.dll" (ByVal port As Long, ByVal baudrate As Long) As Long
'BOOL MERCURY_FUNC_DECL Mercury_IsConnected(int ID);
Private Declare Function Mercury_IsConnected Lib "PI_Mercury_GCS_DLL.dll" (ByVal ID As Long) As Long
'void MERCURY_FUNC_DECL Mercury_CloseConnection(int ID);
Private Declare Sub Mercury_CloseConnection Lib "PI_Mercury_GCS_DLL.dll" (ByVal ID As Long)
'int MERCURY_FUNC_DECL Mercury_GetError(int ID);
Private Declare Function Mercury_GetError Lib "PI_Mercury_GCS_DLL.dll" (ByVal ID As Long) As Long
'BOOL MERCURY_FUNC_DECL Mercury_SetErrorCheck(int ID, BOOL bErrorCheck);
Private Declare Function Mercury_SetErrorCheck Lib "PI_Mercury_GCS_DLL.dll" (ByVal ID As Long, ByVal bErrorCheck As Long) As Long
'BOOL MERCURY_FUNC_DECL Mercury_TranslateError(int errNr, char* szBuffer, int maxlen);
Private Declare Function Mercury_TranslateError Lib "PI_Mercury_GCS_DLL.dll" (ByVal errNr As Long, ByVal szBuffer As String, ByVal maxlen As Long) As Long