Method Of Using The Interface Library Functions; Methods Of Calling The Dynamic Library On Windows; Methods Of Vc Calling The Dynamic Library; Method Of Vb Calling The Dynamic Library - ZLG MiniPCIeCAN-2E-U User Manual

Minipcie interface can card
Table of Contents

Advertisement

MiniPCIeCAN-2E-U
MiniPCIe Interface CAN Card User Manual

5. Method of Using The Interface Library Functions

Efficient and easy-to-use secondary development functions, which support various
development environments, such as VC, C#, and Labview.

5.1 Methods of Calling the Dynamic Library on Windows

First, put the library function files in the working directory. The library function file has
three files ControlCAN.h, ControlCAN.lib, ControlCAN.dll and the kerneldlls folder in total.

5.1.1 Methods of VC Calling the Dynamic Library

(1) The ControlCAN.h header file is included in the .CPP file.
Such as: #include "ControlCAN.h"
(2) Connect to the ControlCAN.lib file in the connector settings of the project.
For example: in the VC7 environment, add ControlCAN.lib in the configuration
properties → connector → input → additional dependencies on the project
property page

5.1.2 Method of VB Calling the Dynamic Library

It can be called after declaring it in the following method.
Syntax:
[Public | Private] Declare Function name Lib "libname" [Alias "aliasname"] [([arglist])] [As
type]
The syntax of the Declare statement consists of the following parts:
Public (optional)
Used to declare functions available to all procedures in all modules.
Private (optional)
Used to declare a function that can only be used in the module that contains the
declaration.
Name (mandatory)
Any valid function name. The entry points of a dynamic link library are case-sensitive.
Libname (mandatory)
Contains the declared function dynamic link library name or code resource name.
Alias (optional)
Indicates that the function to be called has another name in the dynamic link library
(DLL). This parameter can be used when the external function name has the same
name as a function. Alias can also be used when a dynamic link library function has
the same name as a public variable, constant or any other procedure in the same
scope. Alias can also be used if a character in the dynamic link library function does
not conform to the naming convention of the dynamic link library.
Aliasname (optional)
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
22
User Manual

Advertisement

Table of Contents
loading

Table of Contents