National Instruments 320685D-01 Drums User Manual


 
Chapter 3 Windows 95/NT Compiler/Linker Issues
©
National Instruments Corporation 3-29 LabWindows/CVI Programmer Reference Manual
Compiling in an External Compiler for Linking in LabWindows/CVI
Use the LabWindows/CVI SDK and ANSI C include files. Specify the following directories
as include paths in the external compiler.
cvi\include
cvi\include\ansi
cvi\sdk\include
Handling Hardware Interrupts under Windows 95/NT
Under Windows 3.1, you can handle hardware interrupts in a DLL. Under Windows 95, you
must handle hardware interrupts in a VxD. Under Windows NT, you must handle hardware
interrupts in a kernel-mode driver. You cannot create VxDs and kernel-mode drivers in
LabWindows/CVI. Instead, you must create them in Microsoft Visual C/C++, and you also
must have the Microsoft Device Driver Developer Kit (DDK).
Under Windows 3.1, it is extremely difficult to call source code into LabWindows/CVI at
interrupt time. Making such a call is easier under Windows 95/NT. Under Windows 95/NT,
you can arrange for the VxD or kernel-mode driver to call a function in your
LabWindows/CVI source code after the interrupt service routine exits. You do this by creating
a separate thread for your interrupt callback function. The callback function executes a loop
that blocks its thread until the interrupt service routine signals it. Each time the interrupt
service routine executes, it unblocks the callback thread. The callback thread then performs
its processing and blocks again.
LabWindows/CVI includes source code template files for a VxD and a kernel mode driver. It
also includes a sample main program to show you how to read and write registers on a board.
There is one set of files for Windows 95 and another for Windows NT.
The files are in
cvi\vxd\win95 and cvi\vxd\winnt. The file template.doc in each
directory contains some basic information.
00ProRef.book : 06chap03.fm Page 29 Monday, March 9, 1998 3:23 PM