Visual C++ (MFC)


Create Project

Launch Visual Studio, select [New]-[Project] from [File] menu.
From the [Templates] of [New Project] dialog box, select [MFC Application] of [Visual C++], and specify the name and location of the project to be created.
Click the [OK] button to the next dialog.

[MFC Application Wizard] dialog is displayed.
Select [Application Type], change it to be [Dialog based].
Click the [Finish] button and the project is created.

* Item names and commands may differ depending on the version of Visual Studio.
   For details, please refer to [Visual Studio Launch Screen].

Include Header File

In order to use the functions of CAN communication driver in Visual C++, CCAN.H file is required.
Include the header file in the source code.
Specify the include at the beginning of the C++ file that will use the functions.

#include "Ccan.h"

Specify Ccan.h as a relative path from the C++ file.

Include Library File

For Visual C++, the library files in addition to the header file is also required.
Add CCAN.LIB from [Project]-[Add Existing Item].

Console Application

The functions provided in this driver are the form of WIN32 API.
In order to call this style of function, you may need to include "windows.h".