Attribute VB_Name = "BS_SDK" Public Type BSLogRecord event As Byte reserved1 As Byte tnaEvent As Integer eventTime As Long userID As Long reserved2 As Long End Type Public Type BSUserhdr ID As Long reserved1 As Integer adminLevel As Integer securityLevel As Integer statusMask As Integer accessGroupMask As Long username As String * 33 department As String * 33 password As String * 17 numOfFinger As Integer duressMask As Integer checksum(9) As Byte End Type Public Type BSFingerprintConfig security As Long userSecurity As Long fastMode As Long sensitivity As Long timeout As Long imageQuality As Long viewImage As Integer reserved(4) As Long End Type Public Declare Function BS_InitSDK Lib "BS_SDK" () As Long Public Declare Function BS_OpenSocket Lib "BS_SDK" (ByVal biostationAddr As String, ByVal port As Long, ByRef handle As Long) As Long Public Declare Function BS_CloseSocket Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_GetBiostationID Lib "BS_SDK" (ByVal handle As Long, ByRef biostationID As Long) As Long Public Declare Function BS_SetBiostationID Lib "BS_SDK" (ByVal handle As Long, ByVal ID As Long) As Long Public Declare Function BS_ReadLog Lib "BS_SDK" (ByVal handle As Long, ByVal startTime As Long, ByVal endTime As Long, ByRef numOfLog As Long, ByRef logRecord As BSLogRecord) As Long Public Declare Function BS_ConvertToLocalTime Lib "BS_SDK" (ByVal utcTime As Long) As Long Public Declare Function BS_ClearLogCache Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_ReadLogCache Lib "BS_SDK" (ByVal handle As Long, ByRef numOfLog As Long, ByRef logRecord As BSLogRecord) As Long Public Declare Function BS_GetUserDBInfo Lib "BS_SDK" (ByVal handle As Long, ByRef numOfUser As Long, ByRef numOfTemplate As Long) As Long Public Declare Function BS_Disable Lib "BS_SDK" (ByVal handle As Long, ByVal timeout As Long) As Long Public Declare Function BS_ScanTemplate Lib "BS_SDK" (ByVal handle As Long, ByRef template As Byte) As Long Public Declare Function BS_EnrollUser Lib "BS_SDK" (ByVal handle As Long, ByRef hdr As BSUserhdr, ByRef template As Byte) As Long Public Declare Function BS_Enable Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_ReadFingerprintConfig Lib "BS_SDK" (ByVal handle As Long, ByRef config As BSFingerprintConfig) As Long Public Declare Function BS_WriteFingerprintConfig Lib "BS_SDK" (ByVal handle As Long, ByRef config As BSFingerprintConfig) As Long Public Declare Function BS_OpenUSBMemory Lib "BS_SDK" (ByVal driverletter As String, ByVal handle As Long) As Long Public Declare Function BS_CloseUSBMemory Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_GetTime Lib "BS_SDK" (ByVal handle As Long, ByRef timeVal As Long) As Long Public Declare Function BS_SetTime Lib "BS_SDK" (ByVal handle As Long, ByVal timeVal As Long) As Long Public Declare Function BS_Reset Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_UpgradeEx Lib "BS_SDK" (ByVal handle As Long, ByVal upgradeFile As String) As Long Public Declare Function BS_GetLogCount Lib "BS_SDK" (ByVal handle As Long, ByRef numOfLog As Long) As Long Public Declare Function BS_DeleteUser Lib "BS_SDK" (ByVal handle As Long, ByVal userID As Long) As Long Public Declare Function BS_DeleteAllUser Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_GetUser Lib "BS_SDK" (ByVal handle As Long, ByVal userID As Long, ByRef hdr As BSUserhdr, ByRef template As Byte) As Long Public Declare Function BS_GetUserInfo Lib "BS_SDK" (ByVal handle As Long, ByVal userID As Long, ByRef hdr As BSUserhdr) As Long Public Declare Function BS_GetAllUserInfo Lib "BS_SDK" (ByVal handle As Long, ByRef hdr As BSUserhdr, ByRef numOfUser As Long) As Long Public Enum ServerEvent BS_SERVER_CB_CONN_NOAUTH = 0 BS_SERVER_CB_CONN_SSL BS_SERVER_CB_CONN_LOG BS_SERVER_CB_DISCONN_NOAUTH BS_SERVER_CB_DISCONN_SSL BS_SERVER_CB_LOG KEEP_ALIVE_INTERVAL = 100 End Enum 'typedef BS_RET_CODE (__stdcall *BS_CallbackProc)( int handle, unsigned biostationID, int type, void* data, int dataLen ); Public Declare Function BS_StartServerApp Lib "BS_SDK" (ByVal port As Long, ByVal maxConnection As Long, ByVal sslPath As String, ByVal sslPassword As String, ByVal connCheckDuration As Long) As Long Public Declare Function BS_StopServerApp Lib "BS_SDK" () As Long Public Declare Function BS_SetCallback Lib "BS_SDK" (ByVal functionID As Long, ByVal proc As Long) As Long Public Declare Function BS_IssueCertificate Lib "BS_SDK" (ByVal handle As Long, ByVal biostationID As Long) As Long Public Declare Function BS_StartLogMonitoring Lib "BS_SDK" (ByVal handle As Long) As Long Public Declare Function BS_GetConnectedList Lib "BS_SDK" (ByVal handle As Long, ByRef biostationList As Long, ByRef count As Long) As Long Public Declare Function BS_CloseConnection Lib "BS_SDK" (ByVal biostationID As Long) As Long Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal length As Long) 'Public Declare Function BS_InitSDK Lib "BS_SDK" Alias "_BS_InitSDK@0" () As Long 'Public Declare Function BS_OpenSocket Lib "BS_SDK" Alias "_BS_OpenSocket@12" (ByVal biostationAddr As String, ByVal port As Long, ByRef handle As Long) As Long 'Public Declare Function BS_CloseSocket Lib "BS_SDK" Alias "_BS_CloseSocket@4" (ByVal handle As Long) As Long 'Public Declare Function BS_GetBiostationID Lib "BS_SDK" Alias "_BS_GetBiostationID@8" (ByVal handle As Long, ByRef biostationID As Long) As Long 'Public Declare Function BS_SetBiostationID Lib "BS_SDK" Alias "_BS_SetBiostationID@8" (ByVal handle As Long, ByVal ID As Long) As Long 'Public Declare Function BS_ReadLog Lib "BS_SDK" Alias "_BS_ReadLog@20" (ByVal handle As Long, ByVal startTime As Long, ByVal endTime As Long, ByRef numOfLog As Long, ByRef logRecord As BSLogRecord) As Long 'Public Declare Function BS_ConvertToLocalTime Lib "BS_SDK" Alias "_BS_ConvertToLocalTime@4" (ByVal utcTime As Long) As Long 'Public Declare Function BS_ClearLogCache Lib "BS_SDK" Alias "_BS_ClearLogCache@4" (ByVal handle As Long) As Long 'Public Declare Function BS_ReadLogCache Lib "BS_SDK" Alias "_BS_ReadLogCache@12" (ByVal handle As Long, ByRef numOfLog As Long, ByRef logRecord As BSLogRecord) As Long 'Public Declare Function BS_GetUserDBInfo Lib "BS_SDK" Alias "_BS_GetUserDBInfo@12" (ByVal handle As Long, ByRef numOfUser As Long, ByRef numOfTemplate As Long) As Long 'Public Declare Function BS_Disable Lib "BS_SDK" Alias "_BS_Disable@8" (ByVal handle As Long, ByVal timeout As Long) As Long 'Public Declare Function BS_ScanTemplate Lib "BS_SDK" Alias "_BS_ScanTemplate@8" (ByVal handle As Long, ByRef template As Byte) As Long 'Public Declare Function BS_EnrollUser Lib "BS_SDK" Alias "_BS_EnrollUser@12" (ByVal handle As Long, ByRef hdr As BSUserhdr, ByRef template As Byte) As Long 'Public Declare Function BS_Enable Lib "BS_SDK" Alias "_BS_Enable@4" (ByVal handle As Long) As Long 'Public Declare Function BS_ReadFingerprintConfig Lib "BS_SDK" Alias "_BS_ReadFingerprintConfig@8" (ByVal handle As Long, ByRef config As BSFingerprintConfig) As Long 'Public Declare Function BS_WriteFingerprintConfig Lib "BS_SDK" Alias "_BS_WriteFingerprintConfig@8" (ByVal handle As Long, ByRef config As BSFingerprintConfig) As Long 'Public Declare Function BS_OpenUSBMemory Lib "BS_SDK" Alias "_BS_OpenUSBMemory@8" (ByVal driverletter As String, ByVal handle As Long) As Long 'Public Declare Function BS_CloseUSBMemory Lib "BS_SDK" Alias "_BS_CloseUSBMemory@4" (ByVal handle As Long) As Long 'Public Declare Function BS_GetTime Lib "BS_SDK" Alias "_BS_GetTime@8" (ByVal handle As Long, ByRef timeVal As Long) As Long 'Public Declare Function BS_SetTime Lib "BS_SDK" Alias "_BS_SetTime@8" (ByVal handle As Long, ByVal timeVal As Long) As Long 'Public Declare Function BS_Reset Lib "BS_SDK" Alias "_BS_Reset@4" (ByVal handle As Long) As Long 'Public Declare Function BS_UpgradeEx Lib "BS_SDK" Alias "_BS_UpgradeEx@8" (ByVal handle As Long, ByVal upgradeFile As String) As Long 'Public Declare Function BS_DisableCommunication Lib "BS_SDK" Alias "_BS_DisableCommunication@4" (ByVal handle As Long) As Long 'Public Declare Function BS_EnableCommunication Lib "BS_SDK" Alias "_BS_EnableCommunication@8" (ByVal handle As Long, ByVal password As String) As Long 'Public Declare Function BS_GetLogCount Lib "BS_SDK" Alias "_BS_GetLogCount@8" (ByVal handle As Long, ByRef numOfLog As Long) As Long 'Public Declare Function BS_DeleteUser Lib "BS_SDK" Alias "_BS_DeleteUser@8" (ByVal handle As Long, ByVal userID As Long) As Long 'Public Declare Function BS_DeleteAllUser Lib "BS_SDK" Alias "_BS_DeleteAllUser@4" (ByVal handle As Long) As Long 'Public Declare Function BS_GetUser Lib "BS_SDK" Alias "_BS_GetUser@16" (ByVal handle As Long, ByVal userID As Long, ByRef hdr As BSUserhdr, ByRef template As Byte) As Long 'Public Declare Function BS_GetUserInfo Lib "BS_SDK" Alias "_BS_GetUserInfo@12" (ByVal handle As Long, ByVal userID As Long, ByRef hdr As BSUserhdr) As Long 'Public Declare Function BS_GetAllUserInfo Lib "BS_SDK" Alias "_BS_GetAllUserInfo@12" (ByVal handle As Long, ByRef hdr As BSUserhdr, ByRef numOfUser As Long) As Long 'Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal length As Long)