6 incorporating the library, 1 file structure, 2 linking – KEYENCE LJ-V7000 Series User Manual

Page 7: 2 c#/vb.net, 7 types, Incorporating the library 6.1, File structure, Linking 6.2.1, C#/vb.net, Types

Advertising
background image

7

LJ-V7000_COM_RM_E

6

Incorporating the Library

6.1

File structure

The files required at execution are listed below.
Place these folders/files in the same folder as the executable file.
• LJV7_IF.dll

6.2

Linking

6.2.1 C++

6.2.1.1 Linking

The library can be linked implicitly or explicitly.
To implicitly link the library, link with "LJV7_IF.lib".
* "LJV7_IF.lib" was built with Visual C++ 2008 SP1.

6.2.1.2 Include files

Include the following header files in the necessary source files.
• LJV7_IF.h
• LJV7_ErrorCode.h

6.2.2 C#/VB.NET

Call each interface using the DllImport attribute.
When passing a structure as an interface argument, specify the StructLayout attribute and pass a structure
of the same memory structure as the DLL.
For details, refer to the NativeMethods class (NativeMethods.cs) in the sample.
The processing to call each function has been implemented.

7

Types

In this document, variable types are described according to the following definitions.

CHAR

Signed 8-bit integer

BYTE

Unsigned 8-bit integer

SHORT

Signed 16-bit integer

WORD

Unsigned 16-bit integer

LONG

Signed 32-bit integer

DWORD

Unsigned 32-bit integer

FLOAT

Single precision floating point number (32 bits)

DOUBLE

Double precision floating point number (64 bits)

Advertising