|Download Help (Windows Only)|
The Automotive Diagnostic Command Set software supports Microsoft Visual C/C++ 6.
The header file for Visual C/C++ 6 is in the Program Files\National Instruments\Shared\ExternalCompilerSupport\C\include folder. To use the Automotive Diagnostic Command Set API, include the nidiagcs.h header file in the code, then link with the nidiagcs.lib library file. The library file is in the Program Files\National Instruments\Shared\ExternalCompilerSupport\C\lib32\msvc folder.
For C applications (files with a .c extension), include the header file by adding a #include to the beginning of the code, as follows:
For C++ applications (files with a .cpp extension), define __cplusplus before including the header, as follows:
The __cplusplus define enables the transition from C++ to the C language functions.
The Automotive Diagnostic Command Set API for C section of this help describes each function.
On Windows Vista (with Standard User Account), the typical path to the C examples folder is \Users\Public\Documents\National Instruments\Automotive Diagnostic Command Set\Examples\MS Visual C.
On Windows XP/2000, the typical path to the C examples folder is \Documents and Settings\All Users\Documents\National Instruments\Automotive Diagnostic Command Set\Examples\MS Visual C.
Each example is in a separate folder. The example description is in comments at the top of the .c file. At the command prompt, after setting MSVC environment variables (such as with MS vcvars32.bat), you can build each example using a command such as:
cl /I<HDir> GetDTCs.c <LibDir>\nidiagcs.lib
<HDir> is the folder where nidiagcs.h can be found.
<LibDir> is the folder where nidiagcs.lib can be found.