National Instruments 320685D-01 Drums User Manual


 
Chapter 3 Windows 95/NT Compiler/Linker Issues
©
National Instruments Corporation 3-27 LabWindows/CVI Programmer Reference Manual
include files. For more information, refer to the Setting Up Include Paths for
LabWindows/CVI, ANSI C, and SDK Libraries section later in this chapter.
The number of SDK include files is very large. Normally, you have to include only
windows.h because it includes many, but not all, of the other include files. The inclusion of
windows.h along with its subsidiary include files significantly increases compilation time
and memory usage.
WIN32_LEAN_AND_MEAN is a macro from Microsoft that speeds
compiling by eliminating the less commonly used portions of
windows.h and its subsidiary
include files. By default, LabWindows/CVI adds
/DWIN32_LEAN_AND_MEAN as a
compile-time definition when you create a new project. You can alter this setting by using the
Compiler Defines command in the Options menu of the Project window.
Using Windows SDK Functions for User Interface Capabilities
The LabWindows/CVI User Interface Library uses the Windows SDK. It is not designed to
be used in programs that attempt to build other user interface objects at the SDK level. While
no specific restrictions exist on using SDK functions in LabWindows/CVI, National
Instruments recommends that you base your user interface either entirely on the
LabWindows/CVI User Interface Library or entirely on another user interface development
system.
Using Windows SDK Functions to Create Multiple Threads
Although you can use the Windows SDK Functions to create multiple threads in a
LabWindows/CVI program, the LabWindows/CVI development environment cannot handle
multiple threads. For instance, if your main program terminates without destroying the
threads, they do not terminate. Also, the LabWindows/CVI libraries are not multithread safe
when you run a program in the LabWindows/CVI development environment.
For information on using the LabWindows/CVI libraries in a multithreaded executable, refer
to the Multithreading and the LabWindows/CVI Libraries section earlier in this chapter.
Automatic Loading of SDK Import Libraries
All the SDK functions are in DLLs. LabWindows/CVI and the four external compilers each
come with a number of DLL import libraries for the SDK functions. Most of the commonly
used SDK functions are in the following three import libraries:
kernel32.lib
gdi32.lib
user32.lib
LabWindows/CVI for Windows 95/NT automatically loads these three libraries when it starts
up and searches them to resolve references at link time. Thus, you do not have to include these
libraries in your project.
00ProRef.book : 06chap03.fm Page 27 Monday, March 9, 1998 3:23 PM