📄 nidaqmxerrorcheck.bas
字号:
Attribute VB_Name = "NIDAQmx"
Public Sub DAQmxErrChk(errorCode As Long)
'
' Utility function to handle errors by recording the DAQmx error code
' and message.
'
Dim errorString As String
Dim bufferSize As Long
Dim status As Long
If (errorCode < 0) Then
' Find out the error message length.
bufferSize = DAQmxGetErrorString(errorCode, 0, 0)
' Allocate enough space in the string.
errorString = String$(bufferSize, 0)
' Get the actual error message.
status = DAQmxGetErrorString(errorCode, errorString, bufferSize)
' Trim it to the actual length, and display the message
errorString = Left(errorString, InStr(errorString, Chr$(0)))
Err.Raise errorCode, , errorString
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -