
5.5
Visual C++ Programming Example
Program used in this example: Microsoft Visual C++6.0
Function realized in this example:search for the instrument address, connect to the
instrument, send commands, and read return values.
1. Run Microsoft Visual C++ 6.0. Create an MFC project based on a dialog box and
name it "DSG5000_DEMO_VC".
2. Click Project > Settings and add visa32.lib in the "Link" tab in the pop-up
interface manually.
3. Click Tools > Options and add the Include and Lib directories under the
Directories tab in the pop-up interface.
- Select Include files from the drop-down list under Show directories for. Double
click the empty space under Directories to enter the specified path of Include
files: C:\Program Files\IVI Foundation\VISA\WinNT\include. Click OK to close
the dialog box.
- Select Library files from the drop-down list under Show directories for. Double
click the empty space under Directories to enter the specified path of Library
files
:
C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc. Click OK to close
the dialog box.
NOTE
The two paths added here are related to the installation path of NI-VISA on your PC. By
default, NI-VISA is installed under C:\Program Files\IVI Foundation\VISA.
Programming Examples
128
Copyright ©RIGOL TECHNOLOGIES CO., LTD. All rights reserved.