Windows SDK Include Files

You must include the Windows SDK include files before the LabWindows/CVI include files. This way, you avoid problems that arise from function name and typedef conflicts between the Windows SDK and the LabWindows/CVI libraries. The LabWindows/CVI include files contain special macros and conditional compilation to adjust for declarations in the Windows SDK include files. Thus, LabWindows/CVI must process the Windows SDK include files first, followed by the LabWindows/CVI include files.

When you compile in LabWindows/CVI or when you use an external compiler to compile your source files for linking in LabWindows/CVI, use the LabWindows/CVI Windows SDK include files. The LabWindows/CVI Windows SDK include files are in the <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1 directory. The LabWindows/CVI compiler automatically searches that directory. You do not have to add it to your include paths.

When you use an external compiler to compile and link your source files, you must use the Windows SDK include files that come with the external compiler. If you use an external compiler to compile your source files for linking in LabWindows/CVI, use the LabWindows/CVI Windows SDK include files.

The number of Windows SDK include files is very large. Normally, you must 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 in the Compiler Defines section of the Build Options dialog box.

Note Note  The base package of LabWindows/CVI includes a subset of the Windows SDK functions. Refer to the Availability of Windows SDK Functions topic for a full list of functions available in the Windows SDK and the LabWindows/CVI version in which they are available.
Note

Note  LabWindows/CVI includes Windows SDK features in the oldest supported version of Windows. To use Windows SDK features in more recent supported versions of Windows, set the WINVER flag to a version of Windows that supports those features. For example, LabWindows/CVI 2015 supports features from Windows 7 and older. By default, the WINVER flag is set so that only Windows SDK features that are included in Windows 7 and older are included. If you want to include features from Windows 8 you must change the value of WINVER.

WAS THIS ARTICLE HELPFUL?

Not Helpful