# Error Codes for CmtStatus

LabWindows/CVI Utility Library Multithreading functions return a CmtStatus code. The functions return a CmtStatus code with a value of 0 to indicate success and a negative value to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code.

The following table lists the possible CmtStatus codes.

Code | Description
0 | No error.
-14901 | Invalid handle.
-14902 | Invalid parameter.
-14903 | Invalid attribute ID.
-14904 | Invalid event ID.
-14905 | Out of memory.
-14906 | The time limit expired.
-14907 | Another callback is registered for this event. You can only register one callback per event.
-14908 | Invalid callback ID.
-14909 | Invalid thread ID.
-14910 | System error occurred.
-14911 | This thread or another thread is currently reading from the thread safe queue.
-14912 | This thread or another thread is currently writing to the thread safe queue.
-14913 | The thread safe queue is full.
-14914 | The thread safe queue is empty.
-14915 | You read more data than was available in the thread safe queue.
-14916 | 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 | 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 | This type of access to the queue is not permitted.
-14919 | The thread currently holding the write pointer cannot resize the thread safe queue.
-14920 | You must release the pointer from the same thread that got it.
-14921 | You cannot set this attribute while threads exist in the thread pool.
-14922 | Invalid thread priority.
-14923 | Invalid function ID.
-14924 | 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 | The function attribute is not available at this time.
-14926 | You can only perform this operation on a thread pool thread.
-14927 | You cannot perform this operation on the default thread pool.
-14928 | You cannot reduce the maximum number of threads in the thread pool.
-14929 | You must release the thread safe variable from the same thread that got it.
-14930 | You must release the lock from the same thread that got it.
-14931 | You cannot discard a lock that is still owned.
-14932 | You must get the lock before releasing it.