Other Programming Languages

Automotive Diagnostic Command Set Toolkit Help

Edition Date: November 2018

Part Number: 372140J-01

»View Product Info
Download Help (Windows Only)

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 pointers to Automotive Diagnostic Command Set functions in the application. The following section describes how to use the Win32 functions for C/C++ environments other than Visual C/C++ 6. For more detailed information, refer to Microsoft documentation.

The following C language code fragment shows how to call Win32 LoadLibrary to load the Automotive Diagnostic Command Set API DLL:

#include <windows.h>
#include "nidiagcs.h"
HINSTANCE NiDiagCSLib = NULL;
NiMcLib = LoadLibrary("nidiagcs.dll");

Next, the application must call the Win32 GetProcAddress function to obtain a pointer to each Automotive Diagnostic Command Set function the application uses. For each function, you must declare a pointer variable using the prototype of the function. For the Automotive Diagnostic Command Set function prototypes, refer to the Automotive Diagnostic Command Set API for C section of this help. Before exiting the application, you must unload the Automotive Diagnostic Command Set DLL as follows:

FreeLibrary (NiDiagCSLib);

WAS THIS ARTICLE HELPFUL?

Not Helpful