![background image](http://html2.mh-extra.com/html/national-instruments/mxi-2/mxi-2_getting-started_3413085030.webp)
Chapter 3
Developing Your Application
PCI-Based MXI-2 Interface for Windows
3-8
ni.com
Note
viMemAlloc()
or
VXImemAlloc()
returns 32-bit aligned, page-locked,
continuous buffers which work efficiently with the move operations.
Shared Memory
In the
Hardware Configuration
settings of the PCI-MXI-2 and
PCI-MXI-2 Universal in MAX, you can share memory on your computer
or from DRAM added to the PCI-MXI-2 and PCI-MXI-2 Universal.
Right-click any of the settings or refer to the help in MAX for more
information. You can access shared memory on your computer using
VXImemAlloc()
in NI-VXI and
viMemAlloc()
in VISA.
NI-VXI API Notes
The following sections apply only if you are using the NI-VXI API. NI
recommends that all new VXI/VME applications use the NI-VISA API,
but you can still develop with the older NI-VXI API for compatibility with
legacy code.
Compiler Symbols
You may need to define certain compiler symbols so that the NI-VXI
library can work properly with your program. The required symbol
indicates your operating system platform; for example,
VXINT
designates
the application as a Windows 2000/NT/Me/98 application.
Note
LabWindows/CVI automatically defines the correct symbol. You do not need to
define
VXINT
when using LabWindows/CVI.
The additional symbol
BINARY_COMPATIBLE
is optional. It ensures that
the resulting application is binary compatible with other National
Instruments VXI controllers using the same operating system. This symbol
may cause a slight performance degradation when you use low-level
VXIbus access functions.
You can define these symbols using
#define
statements in your source
code or using the appropriate option in your compiler (typically either
-D
or
/D
). If you use
#define
statements, they must appear in the code
before the line that includes the NI-VXI API header
nivxi.h
.