📄 modrecordcd.bas
字号:
Attribute VB_Name = "Globals"
Option Explicit
Public Function GetWriteErrorMessage(ByRef objCDR As CDWriterXP, ByVal WriteError As CDWriterXPLib.eWriteError, ByVal DeviceError As CDWriterXPLib.eCDError) As String
'This function will build a string to display the error to the user
Dim strError As String
'Show the correct error message
Select Case WriteError
Case errDriveError
'If there is a drive error, you can retrieve the exact DeviceError
'Including exact Error sense data from the drive. GetLastError gives an enum
'of the error.GetErrorData returns a string representing the actual error data
'returned from the device
'Use the object browser to find the corresponding eWriteError to determine the error more thouroughly
'strError = "A device error has occurred. Device Error " & _
' DeviceError & vbCrLf & _
' "Error Data - " & objCDR.GetErrorData()
strError = "光盘非空,请放入空刻录光盘!"
Case errFileError
'File Error - details raised previously in TrackFileError event
'strError = "A file error was encountered while writing the disc."
strError = "写入光盘时,发生文件错误!"
Case errInvalidFormat
'One of the tracks were added to the queue with an invalid format
strError = "Tracks have been added the disc image with an invalid format...Please try again."
Case errNoTracksQueued
'No tracks were added to the queue
'strError = "Tracks have been added the disc image...Please add tracks and try again."
strError = "光盘损坏!请重试。"
Case errReadBufferInitFailed
'strError = "The read buffer could not be initialized...check your memory/disc resources."
strError = "内存读取错误!请检测内存。"
Case errWriteBufferInitFailed
strError = "The write buffer could not be initialized...check your memory/disc resources."
strError = "内存写入错误!请检测内存。"
Case Else
'Should never get here
strError = "未知错误!"
End Select
'Return the error message
GetWriteErrorMessage = strError
End Function
Public Function GetFileErrorMessage(ByVal FileError As CDWriterXPLib.eTrackFileError, ByVal FileName As String)
Dim strErrorMsg As String
'This function will handle the file error
Select Case FileError
Case tfeFileBufferError
'strErrorMsg = "Error buffering file: " & FileName
strErrorMsg = "写入缓冲区文件错误: " & FileName
Case tfeFileOpenError
'strErrorMsg = "Error opening file: " & FileName
strErrorMsg = "文件打开错误: " & FileName
Case tfeFileReadError
'strErrorMsg = "Error reading file: " & FileName
strErrorMsg = "文件读取错误: " & FileName
Case tfeFileWriteError
'strErrorMsg = "Error writing file: " & FileName
strErrorMsg = "文件写入错误: " & FileName
Case Else
'strErrorMsg = "Unknown file error!:"
strErrorMsg = "未知的文件错误!:"
End Select
'Return error message
GetFileErrorMessage = strErrorMsg
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -