📄 pccapiutils.vb
字号:
CONAError2String = "ECONA_CACHE_IS_NOT_AVAILABLE: Cache is not available (CONASearchDevices)."
ElseIf errorCode = ECONA_MEDIA_IS_NOT_ACTIVE Then
CONAError2String = "ECONA_MEDIA_IS_NOT_ACTIVE: Target media is busy (or not ready yet)."
ElseIf errorCode = ECONA_PORT_OPEN_FAILED Then
CONAError2String = "ECONA_PORT_OPEN_FAILED: Cannot open the changed COM port."
' Device pairing related errors:
ElseIf errorCode = ECONA_DEVICE_PAIRING_FAILED Then
CONAError2String = "ECONA_DEVICE_PAIRING_FAILED: Pairing failed."
ElseIf ECONA_DEVICE_PASSWORD_WRONG Then
errorCode = CONAError2String = "ECONA_DEVICE_PASSWORD_WRONG: Wrong password on device."
ElseIf ECONA_DEVICE_PASSWORD_INVALID Then
errorCode = CONAError2String = "ECONA_DEVICE_PASSWORD_INVALID: Password includes invalid characters or is missing."
' File System errors:
ElseIf errorCode = ECONA_ALL_LISTED Then
CONAError2String = "ECONA_ALL_LISTED: All items are listed."
ElseIf errorCode = ECONA_MEMORY_FULL Then
CONAError2String = "ECONA_MEMORY_FULL: Device memory full."
' File System errors for file functions:
ElseIf errorCode = ECONA_FILE_NAME_INVALID Then
CONAError2String = "ECONA_FILE_NAME_INVALID: File name contains invalid characters in Device or PC."
ElseIf errorCode = ECONA_FILE_NAME_TOO_LONG Then
CONAError2String = "ECONA_FILE_NAME_TOO_LONG: File name contains too many characters in Device or PC."
ElseIf errorCode = ECONA_FILE_ALREADY_EXIST Then
CONAError2String = "ECONA_FILE_ALREADY_EXIST: File already exists in Device or PC."
ElseIf errorCode = ECONA_FILE_NOT_FOUND Then
CONAError2String = "ECONA_FILE_NOT_FOUND: File does not exist in Device or PC."
ElseIf errorCode = ECONA_FILE_NO_PERMISSION Then
CONAError2String = "ECONA_FILE_NO_PERMISSION: Not allowed to perform required operation to file in device or PC."
ElseIf errorCode = ECONA_FILE_COPYRIGHT_PROTECTED Then
CONAError2String = "ECONA_FILE_COPYRIGHT_PROTECTED: Not allowed to perform required operation to file in device or PC."
ElseIf errorCode = ECONA_FILE_BUSY Then
CONAError2String = "ECONA_FILE_BUSY: Other application has reserved file in device or PC."
ElseIf errorCode = ECONA_FILE_TOO_BIG_DEVICE Then
CONAError2String = "ECONA_FILE_TOO_BIG_DEVICE: Device rejected the operation because file size is too big."
ElseIf errorCode = ECONA_FILE_TYPE_NOT_SUPPORTED Then
CONAError2String = "ECONA_FILE_TYPE_NOT_SUPPORTED: Device rejected the operation because file has unsupported type."
ElseIf errorCode = ECONA_FILE_NO_PERMISSION_ON_PC Then
CONAError2String = "ECONA_FILE_NO_PERMISSION_ON_PC: Not allowed to perform required operation to file in PC."
ElseIf errorCode = ECONA_FILE_EXIST Then
CONAError2String = "ECONA_FILE_EXIST: File move or rename: File is copied to target path with new name but removing the source file failed."
ElseIf errorCode = ECONA_FILE_CONTENT_NOT_FOUND Then
CONAError2String = "ECONA_FILE_CONTENT_NOT_FOUND: Specified file content does not found (e.g. unknown file section or stored position)"
ElseIf errorCode = ECONA_FILE_OLD_FORMAT Then
CONAError2String = "ECONA_FILE_OLD_FORMAT: Specified file content supports old engine"
ElseIf errorCode = ECONA_FILE_INVALID_DATA Then
CONAError2String = "ECONA_FILE_INVALID_DATA: Specified file data is invalid"
' File System errors for folder functions:
ElseIf errorCode = ECONA_INVALID_DATA_DEVICE Then
CONAError2String = "ECONA_INVALID_DATA_DEVICE: Device's folder contains invalid data."
ElseIf errorCode = ECONA_CURRENT_FOLDER_NOT_FOUND Then
CONAError2String = "ECONA_CURRENT_FOLDER_NOT_FOUND: Current folder is invalid in device (e.g MMC card removed)."
ElseIf errorCode = ECONA_FOLDER_PATH_TOO_LONG Then
CONAError2String = "ECONA_FOLDER_PATH_TOO_LONG: Maximum folder path length is 255 characters."
ElseIf errorCode = ECONA_FOLDER_NAME_INVALID Then
CONAError2String = "ECONA_FOLDER_NAME_INVALID: Folder name includes invalid characters in Device or PC."
ElseIf errorCode = ECONA_FOLDER_ALREADY_EXIST Then
CONAError2String = "ECONA_FOLDER_ALREADY_EXIST: Folder already exists in target folder."
ElseIf errorCode = ECONA_FOLDER_NOT_FOUND Then
CONAError2String = "ECONA_FOLDER_NOT_FOUND: Folder does not exist in target folder."
ElseIf errorCode = ECONA_FOLDER_NO_PERMISSION Then
CONAError2String = "ECONA_FOLDER_NO_PERMISSION: Not allowed to perform required operation to folder in Device."
ElseIf errorCode = ECONA_FOLDER_NOT_EMPTY Then
CONAError2String = "ECONA_FOLDER_NOT_EMPTY: Not allowed to perform required operation because folder is not empty."
ElseIf errorCode = ECONA_FOLDER_NO_PERMISSION_ON_PC Then
CONAError2String = "ECONA_FOLDER_NO_PERMISSION_ON_PC: Not allowed to perform required operation to folder in PC."
' Application installation error:
ElseIf errorCode = ECONA_DEVICE_INSTALLER_BUSY Then
CONAError2String = "ECONA_DEVICE_INSTALLER_BUSY: Cannot start device's installer."
' Syncronization specific error codes:
ElseIf errorCode = ECONA_UI_NOT_IDLE_DEVICE Then
CONAError2String = "ECONA_UI_NOT_IDLE_DEVICE: Device rejects the operation. Maybe device's UI is not in idle state."
ElseIf errorCode = ECONA_SYNC_CLIENT_BUSY_DEVICE Then
CONAError2String = "ECONA_SYNC_CLIENT_BUSY_DEVICE: Device's SA sync client is busy."
ElseIf errorCode = ECONA_UNAUTHORIZED_DEVICE Then
CONAError2String = "ECONA_UNAUTHORIZED_DEVICE: Device rejects the operation. No permission."
ElseIf errorCode = ECONA_DATABASE_LOCKED_DEVICE Then
CONAError2String = "ECONA_DATABASE_LOCKED_DEVICE: Device rejects the operation. Device is locked."
ElseIf errorCode = ECONA_SETTINGS_NOT_OK_DEVICE Then
CONAError2String = "ECONA_SETTINGS_NOT_OK_DEVICE: Device rejects the operation. Maybe settings in Sync profile are wrong on Device."
ElseIf errorCode = ECONA_SYNC_ITEM_TOO_BIG Then
CONAError2String = "ECONA_SYNC_ITEM_TOO_BIG: Device rejected the operation"
ElseIf errorCode = ECONA_SYNC_ITEM_REJECT Then
CONAError2String = "ECONA_SYNC_ITEM_REJECT: Device rejected the operation"
ElseIf errorCode = ECONA_SYNC_INSTALL_PLUGIN_FIRST Then
CONAError2String = "ECONA_SYNC_INSTALL_PLUGIN_FIRST: Device rejected the operation"
' Versit conversion specific error codes:
ElseIf errorCode = ECONA_VERSIT_INVALID_PARAM Then
CONAError2String = "ECONA_VERSIT_INVALID_PARAM: Invalid parameters passed to versit converter."
ElseIf errorCode = ECONA_VERSIT_UNKNOWN_TYPE Then
CONAError2String = "ECONA_VERSIT_UNKNOWN_TYPE: Failed, trying to convert versit formats not supported in VersitConverter."
ElseIf errorCode = ECONA_VERSIT_INVALID_VERSIT_OBJECT Then
CONAError2String = "ECONA_VERSIT_INVALID_VERSIT_OBJECT: Failed, validation of versit data not passed, contains invalid data."
' Database specific error codes:
ElseIf errorCode = ECONA_DB_TRANSACTION_ALREADY_STARTED Then
CONAError2String = "Another transaction is already in progress"
ElseIf errorCode = ECONA_DB_TRANSACTION_FAILED Then
CONAError2String = "Some of operations within a transaction failed and transaction was rolled back"
' Backup specific error codes:
ElseIf errorCode = ECONA_DEVICE_BATTERY_LEVEL_TOO_LOW Then
CONAError2String = "Failed, device rejects the restore operation. Device's battery level is low."
ElseIf errorCode = ECONA_DEVICE_BUSY Then
CONAError2String = "Failed, device rejects the backup/restore operation. Device's backup server busy."
Else
CONAError2String = "Undefined error code" ' shouldn't occur
End If
End Function
'===================================================================
' ErrorMessageDlg -- Show an errormessage
'
'
'===================================================================
Public Sub ShowErrorMessage(ByRef strError As String, ByRef errorCode As Integer)
Dim strMessage As String = strError & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Error: 0x" & Hex(errorCode) & Chr(13) & Chr(10) & CONAError2String(errorCode)
MsgBox(strMessage)
End Sub
End Module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -