Chapter 1 LabWindows/CVI Compiler
LabWindows/CVI Programmer Reference Manual 1-16
©
National Instruments Corporation

Library Functions

The LabWindows/CVI library functions that take pointer arguments or that return pointers
incorporate run-time checking for those arguments and return values. However, you must be
careful when passing arguments to library functions that have void * parameters, such as
GetCtrlAttribute and GetCtrlVal in the User Interface Library and memcpy and
memset in the ANSI C library. If you use a void * cast when you pass an argument to a
function that expects a variably typed argument, you disable run-time checking for that
argument. Some examples follow:
{int value;
GetCtrlVal(panel, ctrl, &value); /* CORRECT */
GetCtrlVal(panel, ctrl, (void *)&value);/* INCORRECT */
}
{char *names[N], *namesCopy[N];
memcpy(namesCopy, names, sizeof (names));/* CORRECT */
memcpy((void *)namesCopy, (void *)names, sizeof names);
/* INCORRECT */
}
Unions
LabWindows/CVI performs only minimal checks for union type variables. If a union
contains pointers, arrays, or structs, LabWindows/CVI does not maintain user protection
information for those objects.
Stack Size
Your program uses the stack for passing function parameters and storing automatic local
variables. You can set the maximum stack size by selecting the Options»Run Opt ions in the
Project window. Table1-3 shows the stack size ranges LabWindows/CVI supports.
Table 1-3. Stack Size Ranges for LabWindows/CVI
Platform Minimum Default Maximum
Windows 3.1 4 KB 40 KB 40 KB
Windows 95/N T 100 KB 250 KB 1 MB
Solaris 1 for Sun 100 KB 250 KB 5 MB
Solaris 2 for Sun 100 KB 250 KB 5 MB

00ProRef.book : 06chap01.fm Page 16 Monday, March 9, 1998 3:23 PM