Utility Library Error Codes
- Updated2023-02-21
- 3 minute(s) read
Utility Library Error Codes
Utility Library functions report error codes as return values. You can check each individual function description in the Utility Library or in the function panel help to determine the error conditions that can occur in each function. The following table lists the error codeserror codes, defined constants, and error messages associated with the Multithreading and the National Instruments Binary Time Format functions in the the LabWindows/CVI Utility Library.
The Result parameter of NI-BTF functions return the single digit errors listed below. The remaining errors listed below are returned in the CmtStatus parameter of Multithreading functions. Use the CmtGetErrorMessage function to convert the CmtStatus error code into meaningful error messages.
![]() |
Note Other Utility Library functions return error codes in the status parameter. You can check each individual function description in the Utility Library or in the function panel help to determine the error conditions that can occur in each function. |
These error codes are defined in the cvi\include\utility.h file.
Code | Defined Constant | Error Message |
---|---|---|
0 | — | No error. |
-1 | kCVITimeInvalidArgumentError | An argument passed to the function is invalid. |
-2 | kCVITimeNullPointerError | A NULL pointer was passed to the function instead of a valid memory address. |
-3 | kCVITimeOverflowError | A numerical calculation resulted in an overflow. |
-4 | kCVITimeDateOutOfRangeError | A time value passed to the function is not in the supported range. |
-5 | kCVITimeOperationFailedError | The operation failed due to an unspecified system error. |
-14901 | kCmtInvalidHandle | Invalid handle. |
-14902 | kCmtInvalidParameter | Invalid parameter. |
-14903 | kCmtInvalidAttribute | Invalid attribute ID. |
-14904 | kCmtInvalidEvent | Invalid event ID. |
-14905 | kCmtOutOfMemory | Out of memory. |
-14906 | kCmtTimeOut | The time limit expired. |
-14907 | kCmtEventCallbackAlreadyRegistered | Another callback is registered for this event. You can only register one callback per event. |
-14908 | kCmtInvalidCallbackID | Invalid callback ID. |
-14909 | kCmtInvalidThreadID | Invalid thread ID. |
-14910 | kCmtSystemError | System error occurred. |
-14911 | kCmtTSQAnotherReaderActive | This thread or another thread is currently reading from the thread safe queue. |
-14912 | kCmtTSQAnotherWriterActive | This thread or another thread is currently writing to the thread safe queue. |
-14913 | kCmtTSQQueueFull | The thread safe queue is full. |
-14914 | kCmtTSQQueueEmpty | The thread safe queue is empty. |
-14915 | kCmtTSQUserReadTooMuch | You read more data than was available in the thread safe queue. |
-14916 | kCmtTSQUserWroteTooMuch | You wrote more data than space was available in the thread safe queue. Memory outside the queue might have been overwritten, putting your system in an unstable state. |
-14917 | kCmtTSQTooManyItemsForAutoFlush | The thread safe queue is configured to automatically flush when full. You cannot write more items to the thread safe queue than it can hold. |
-14918 | kCmtTSQAccessDenied | This type of access to the queue is not permitted. |
-14919 | kCmtTSQCannotResizeFromThread | The thread currently holding the write pointer cannot resize the thread safe queue. |
-14920 | kCmtTSQReleaseFromWrongThread | You must release the pointer from the same thread that got it. |
-14921 | kCmtTPAttrNotSetableWhenThreadsExist | You cannot set this attribute while threads exist in the thread pool. |
-14922 | kCmtTPThreadPriorityInvalid | Invalid thread priority. |
-14923 | kCmtTPInvalidFnID | Invalid function ID. |
-14924 | kCmtTPFnIDOwnedByPool | The function ID you passed is owned by the thread pool. This operation can only be performed on a function ID that you own. |
-14925 | kCmtTPFnAttrUnavailable | The function attribute is not available at this time. |
-14926 | kCmtTPNotAThreadPoolThread | You can only perform this operation on a thread pool thread. |
-14927 | kCmtTPDefaultPoolNotAllowed | You cannot perform this operation on the default thread pool. |
-14928 | kCmtTPCantReduceNumThrds | You cannot reduce the maximum number of threads in the thread pool. |
-14929 | kCmtTSVReleaseFromWrongThread | You must release the thread safe variable from the same thread that got it. |
-14930 | kCmtTLReleaseFromWrongThread | You must release the lock from the same thread that got it. |
-14931 | kCmtTLDiscardOwnedLock | You cannot discard a lock that is still owned. |
-14932 | kCmtTLReleaseWhenNotAcquired | You must get the lock before releasing it. |
-14933 | kCmtTLOperationNotSupported | The lock you passed was not created with the option necessary to perform this operation. |