National Instruments 372139B-01 Automobile User Manual


 
Chapter 3 Application Development
Automotive Diagnostic Command Set User Manual 3-2 ni.com
LabWindows/CVI examples. The examples are in the LabWindows/CVI
\samples\Automotive Diagnostic Command Set directory. Each
example includes a complete LabWindows/CVI project (
.prj file). The
example description is in comments at the top of the
.c file.
Visual C++ 6
The Automotive Diagnostic Command Set software supports Microsoft
Visual C/C++ 6. The header file and library for Visual C/C++ 6 are
in the
\ProgramFiles\National Instruments\Automotive
Diagnostic Command Set\MS Visual C
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. For
C applications (files with a
.c extension), include the header file by adding
a
#include to the beginning of the code, as follows:
#include "nidiagcs.h"
For C++ applications (files with a .cpp extension), define _cplusplus
before including the header, as follows:
#define _cplusplus
#include "nidiagcs.h"
The _cplusplus define enables the transition from C++ to the C language
functions.
Chapter 6, Automotive Diagnostic Command Set API for C, describes each
function. The C examples are in the
Automotive Diagnostic Command
Set\MS Visual C
folder. 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..
GetDTCs.c
..\nidiagcs.lib
Other Programming Languages
The Automotive Diagnostic Command Set software does not provide
formal support for programming languages other than those described in
the preceding sections. If the programming language includes a mechanism
to call a Dynamic Link Library (DLL), you can create code to call
Automotive Diagnostic Command Set functions. All functions for the
Automotive Diagnostic Command Set API are in
nidiagcs.dll. If the
programming language supports the Microsoft Win32 APIs, you can load