National Instruments 320685D-01 Drums User Manual


 
Chapter 9 Checking for Errors in LabWindows/CVI
LabWindows/CVI Programmer Reference Manual 9-6
©
National Instruments Corporation
TCP Library
The TCP Library functions return a negative value when they detect an error. This library uses
a common set of error codes, which the LabWindows/CVI Standard Libraries Reference
Manual and the LabWindows/CVI function panel help list. You can use
GetTCPErrorString to get the error message associated with each TCP Library error code.
DDE Library
The DDE Library functions return a negative value when they detect an error. This library
uses a common set of error codes, which the LabWindows/CVI Standard Libraries Reference
Manual and the LabWindows/CVI function panel help list. You can use the function
GetDDEErrorString to get the error message associated with each DDE Library error code.
ActiveX Automation Library
The ActiveX Automation Library functions return a negative value when they detect an error.
This library uses a common set of error codes. Refer to the LabWindows/CVI Standard
Libraries Reference Manual or the function panel help for a listing of the error codes and
information on the individual functions. You can use
CA_GetAutomationErrorString to
get the error message associated with each ActiveX Automation Library error code.
X Property Library
The X Property Library functions return a negative value when they detect an error. This
library uses a common set of error codes, which the LabWindows/CVI Standard Libraries
Reference Manual and the LabWindows/CVI function panel help list. You can use the
function
GetXPropErrorString to get the error message associated with each X Property
Library error code.
Formatting and I/O Library
This library contains the file I/O, string manipulation, and data formatting functions. All
functions return negative error codes when they detect an error. However, you must keep in
mind an important fact. When you enable debugging, the LabWindows/CVI environment
keeps track of the sizes of strings and arrays. If it detects any attempt to access a string or array
beyond its boundary, the environment halts the program and informs you. It is important to
remember that this feature works only when you execute source code in the
LabWindows/CVI development environment. The string functions can write beyond the end
of a string or array without detection, resulting in corruption of memory. Therefore, you must
use the Formatting and I/O functions on strings and arrays with caution.
In addition to the return codes, the
GetFmtErrNdx and NumFmtdBytes functions
return information on how the last scanning and formatting function executed. The
GetFmtIOError function returns a code that contains specific error information on the last
00ProRef.book : 06chap09.fm Page 6 Monday, March 9, 1998 3:23 PM