UniKey API Reference Error Codes

From SecuTech Wiki
Jump to navigationJump to search


List of Error Codes

General Error Codes

Result Value Description
SUCCESS 0 Success
ERROR_UNIKEY_NOT_FOUND 200 No UniKey dongle
ERROR_UNIKEY_INVALID_PASSWORD 201 Found UniKey dongle, but basic passwords (password 1 and 2) are incorrect
ERROR_UNIKEY_INVALID_PASSWORD_OR_ID 202 Wrong password or UniKey HID
ERROR_UNIKEY_SET_SOFTID 203 Set software ID error
ERROR_UNIKEY_INVALID_ADDR_OR_SIZE 204 Read/Write address is incorrect or invalid length
ERROR_UNIKEY_UNKNOWN_COMMAND 205 No such command
ERROR_UNIKEY_READ_MEMORY 207 Read error
ERROR_UNIKEY_WRITE_MEMORY 208 Write error
ERROR_UNIKEY_RANDOM 209 Random number error
ERROR_UNIKEY_SEED 210 Seed code error
ERROR_UNIKEY_CALCULATE 211 Calculation error
ERROR_UNIKEY_NEED_OPEN 212 Need to log onto a dongle before running
ERROR_UNIKEY_OPEN_OVERFLOW 213 Too many open dongles (>16)
ERROR_UNIKEY_NOMORE 214 No more dongles found
ERROR_UNIKEY_NEED_FIND 215 Find needs to be called before Find_Next
ERROR_UNIKEY_MODULE 216 License module error
ERROR_UNIKEY_AR_BAD_COMMAND 217 Arithmetic instruction error
ERROR_UNIKEY_AR_UNKNOWN_OPCODE 218 Arithmetic operator error
ERROR_UNIKEY_AR_WRONG_BEGIN 219 Constant numbers can't be used on first arithmetic instruction
ERROR_UNIKEY_AR_WRONG_END 220 Constant numbers can't be used on last arithmetic instruction
ERROR_UNIKEY_AR_VALUE_OVERFLOW 221 Constant numbers > 63 will cause an overflow
ERROR_UNIKEY_INVALID_KEY 222 Invalid key in key storage
ERROR_UNIKEY_VERIFY_ADV_PASSWORD 223 Advanced passwords (passwords 3 and 4) not verified
ERROR_UNIKEY_INVALID_KEY_STORE 224 Wrong key storage number
ERROR_UNIKEY_GENERATE_NEW_PASSWORD 225 Error generating new password
ERROR_UNIKEY_READ_UPDATETAG 226 Read UpdateTag error
ERROR_UNIKEY_WRITE_UPDATETAG 227 Write UpdateTag error
ERROR_UNIKEY_ENCRYPT_FAILED 228 Could not encrypt data
ERROR_UNIKEY_DECRYPT_FAILED 229 Could not decrypt data
ERROR_UNIKEY_READ_TIME 230 Get UniKey time error
ERROR_UNIKEY_WRITE_TIME 231 Set UniKey time error
ERROR_UNIKEY_WRITE_TIME_MODULE 232 Error writing to time module
ERROR_UNIKEY_COMPARE_TIME_MODULE 233 The specified time is before the module's start time
ERROR_UNIKEY_TIME_MODULE_NOT_NULL 234 The real time module is not null, this error is returned when the 'write once' flag is set
ERROR_UNIKEY_TIME_MODULE_OVERDUR 235 The specified time is later than the module's end time, or the module is expired
ERROR_UNIKEY_ALREADY_LOCKED 236 Dongle already locked (when attempting to lock twice, or open after locking a dongle)
ERROR_UNIKEY_MAX_USERS 237 Maximum amount of users logged onto the dongle
ERROR_UNIKEY_MAX_KEYS 238 Dongle at max keys, need to delete and then regenerate
ERROR_UNIKEY_KEY_INDEX 239 The handle of the key is invalid
ERROR_UNIKEY_FS_FILE_NAME 240 Wrong or invalid filename
ERROR_UNIKEY_FS_NO_FILE 241 No such filename
ERROR_UNIKEY_FS_FILE_OFFSET 242 File offset error
ERROR_UNIKEY_FS_UNKONW 243 Unknown error
ERROR_UNIKEY_FS_NO_MEMORY 244 Not enough free memory
ERROR_UNIKEY_FS_FILE_EXIST 245 File already exists
ERROR_UNIKEY_FS_ERR_SYS_UNINIT 246 The file system is not initialized
ERROR_UNIKEY_FS_ERR_OPEN_FILE 247 Failed to open file
ERROR_NO_ENCRYPT 248 No Secu Drive
ERROR_PASSWORD 249 Password error
ERROR_USERLOCK 250 User has been locked
ERROR_LOGOUT 251 Logout error
ERROR_UNKNOW 252 Unknown error
ERROR_UNIKEY_WRITE_ARITHMETIC 253 Error writing arithmetic to dongle
ERROR_UNIKEY_PARAMETER 254 Parameter error
ERROR_UNIKEY_TOO_MUCH_THREAD 255 Too many threads (>100) in a single process
ERROR_UNIKEY_GET_TYPE 256 Could not get UniKey type


Network Function Error Codes

ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE 100 Description
ERROR_UNIKEY_NETUNIKEY_MEMORY_ERROR ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+1, 101 Memory allocation error
ERROR_UNIKEY_NETUNIKEY_SEND_ERROR ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+2, 102 Send error
ERROR_UNIKEY_NETUNIEY_RECEIVE_ERROR ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+3, 103 Receive error
ERROR_UNIKEY_NETUNIKEY_MESSAGE_WRONG ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+4, 104 Communication message is modified
ERROR_UNIKEY_NETUNIKEY_SETUP_SOCKET_ERROR ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+5, 105 Setup socket error
ERROR_UNIKEY_NETUNIKEY_CLIENT_EXSIT ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+6, 106 The client already exists, per this mode
ERROR_UNIKEY_NETUNIKEY_TOO_MANY_CLIENT ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+7, 107 The number of clients has been reached
ERROR_UNIKEY_NETUNIKEY_IN_BLACKLIST ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+8, 108 Client is in the blacklist
ERROR_UNIKEY_NETUNIKEY_OUT_WHITELIST ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+9, 109 Client is not in the whitelist
ERROR_UNIKEY_NETUNIKEY_MESSAGE_CHANGE ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+10, 110 The message packet was changed
ERROR_UNIKEY_NETUNIKEY_AREADY_START ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+11, 111 The server has already started
ERROR_UNIKEY_NETUNIKEY_SOCKET_INIT_FAILED ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+12, 112 Cannot initialize the socket
ERROR_UNIKEY_NETUNIKEY_SOCKET_BIND_FAILED ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+13, 113 Cannot bind the port with the socket
ERROR_UNIKEY_NETUNIKEY_SOCKET_LISTEN_FAILED ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+14, 114 Cannot start listening with the socket
ERROR_UNIKEY_NETUNIKEY_START_UDP_SERVER_FAILED ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+15, 115 Starting UDP server failed
ERROR_UNIKEY_NETUNIKEY_TOO_LONG_MESSAGE ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+16, 116 Message too long
ERROR_UNIKEY_NETUNIKEY_NOT_WORKING ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+17, 117 Cannot connect to remote NetUniKey server
ERROR_UNIKEY_NETUNIKEY_DISCARD_BY_SERVER ERROR_UNIKEY_NETUNIKEY_ERROR_UNIKEY_BASE+18, 118 Client is discarded by the server