Chapter 8 Utility Library
© National Instruments Corporation 8-65 LabWindows/CVI Standard Libraries
You can use this function to prevent LabWindows/CVI from displaying the dialog box and
suspending execution when it encounters a protection error. In general, it is better not to disable
the break on protection errors feature. Nevertheless, you may want to disable it temporarily
around a line of code for which LabWindows/CVI is erroneously reporting a protection error.
If debugging is disabled, this function has no effect. Run-time errors are not reported when
debugging is disabled.
Note: If an invalid memory access generates a processor exception, LabWindows/CVI reports
the error and terminates your program regardless of the debugging level or the state of
the break on protection errors feature.
Parameters
Input newState integer Pass a nonzero value to enable. Pass zero to
disable.
Return Value
oldState integer Previous state of the break on protection errors
feature.
Return Codes
1 Was previously enabled.
0 Was previously disabled, or debugging is disabled.
Example
int oldValue;
oldValue = SetBreakOnProtectionErrors (0);
/* the statement that erroneously reports an error */
SetBreakOnProtectionErrors (oldValue);