nidaqmxerrorcheck.bas
来自「将11520采样率(可用cooledit得到)的wav文件转换为可供串口播放的P」· BAS 代码 · 共 29 行
BAS
29 行
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 + =
减小字号Ctrl + -
显示快捷键?