Library Protection Errors
Library functions generate errors when they receive invalid arguments. LabWindows/CVI error checking is sensitive to the requirements of each library function. The following errors involve library protection.
- Passing a null pointer argument to a library function
- Passing an uninitialized pointer argument to a library function
- Passing a pointer to freed memory to a library function
- Passing an argument that is too small
- Passing by reference a scalar argument to a library function that expects an array
- Passing a string argument that does not have a terminating null character
- Passing a string to a library function that expects a character reference parameter
LabWindows/CVI library functions return error codes in a variety of cases. If you enable the Run»Break on»Library Errors option in the Workspace window, LabWindows/CVI suspends execution after a library function returns one of these errors. A message appears that displays the name of the function and either the return value or a string that explains why the function failed.