Utility Library Chapter 8
LabWindows/CVI Standard Libraries 8-64 © National Instruments Corporation
If debugging is disabled, this function has no effect. Run-time errors are never reported when
debugging is disabled.
Parameters
Input newState integer Pass a nonzero value to enable. Pass zero to disable.
Return Value
oldState integer Previous state of the break on library errors feature.
Return Codes
1 Was previously enabled.
0 Was previously disabled, or debugging is disabled.
Example
int oldValue;
oldValue = SetBreakOnLibraryErrors (0);
/* function calls that may legitimately return errors */
SetBreakOnLibraryErrors (oldValue);
SetBreakOnProtectionErrorsint oldState = SetBreakOnProtectionErrors (int newState);
Purpose
If debugging is enabled, LabWindows/CVI uses information it gathers from compiling your
source code to make extensive run-time checks to protect your program. When it encounters a
protection error at run-time, LabWindows/CVI displays a dialog box and suspends execution.
Examples of protection errors are
• An invalid pointer value is dereferenced in source code.
• An attempt is made in source code to read or write beyond the end of an array.
• A function call is made in source code in which an array is smaller than is expected by the
function.
• Pointer arithmetic is performed in source code which generates an invalid address.