User manual
59 PCI-1680U/1682U User Manual
Chapter 4 Software Requirements
4.7 Advantech CAN Windows WDM&CE Driver
application development guide
Users can directly access drivers with WINDOWS Native API. In the following, we will
provide an example by opening a CAN port and reading its current status to explain
how to write basic applications in VC, VB, VB.NET and C# environment.Necessary
files for developing applications are listed below. Suppose installation paths of all
header files in the example are C:\Program Files\ADVANTECH\AdvCAN\Include.
4.7.1 Guide for Visual C++ development
We will give an example by opening a CAN port and reading its current status so as
to simply explain how to write base applications in Visual C++ environment.
4.7.1.1 Create a new VC project
Related header files must be used before using Advantech CAN Windows WDM&CE
Driver interface function. Make sure the driver had been installed correctly.
(Please refer to relevant books and documentations regarding detailed information
about VC development.)
Please follow the following procedures to create a new VC++ project:
1. Select "File/New" from the main menu to create a new application project and
source file. Define the type pf the new project as "Win32 Console Application",
define the platform as "Win32" and select a path for files of the project.
2. Click "OK"->"Finish"->"OK" according to the instructions on the screen.
A new VC project is created.
File name Description
AdvCan.h Header file for VC
AdvCan.cs Header file for C#
AdvCan.vb Header file for VB.NET
AdvCan.bas Header file for VB
Note! Users who use CAN driver on windows CE can directly refer to Structure
list and Introduction to API (GetOverlappedResult is not included).