EasyManua.ls Logo

Scanlab RTC6 PCIe Board - Pascal

Scanlab RTC6 PCIe Board
1004 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC6 boards
Doc. Rev. 1.0.21 en-US
6 Developing RTC6-User Programs
96
innovators for industry
Pascal
Use the file
RTC6Import.pas
as a unit and call the
RTC6 commands you need, like
goto_xy(1000, 2500);
for performing a jump to location 1000, 2500.
C
In C, you can choose either implicit linking – also
known as static load or load-time dynamic linking –
or explicit linking – also known as dynamic load or
run-time dynamic linking.
Implicit Linking
To accomplishing implicit linking, include the header
file
RTC6impl.h
and link with the (C) import library
RTC6DLL.lib
(for Win32 user programs or with
RTC6DLLx64.lib
for Win64 user programs) for
building the executable.
Call the RTC6 commands you need like
goto_xy(1000, 2500);
for causing a jump to location 1000, 2500.
Explicit Linking
To accomplishing explicit linking, include the header
file
RTC6expl.h
. Before calling any RTC6 command,
initialize the RTC6 DLL by calling the function
RTC6open
(which is defined in the file
RTC6expl.c
).
When you have finished the RTC6 session, close the
RTC6 DLL by calling the function
RTC6close
(also
defined in the file
RTC6expl.c
).
For building the executable, link with the file
RTC6expl.obj
, which you can generate from the
RTC6expl.c
source code.
Call the RTC6 commands you need, like
goto_xy(1000, 2500);
for causing a jump to location 1000, 2500.
Differences between Implicit and Explicit Linking
C++
If you want to use references instead of pointers for
returning values to function parameters in C++ (for
instance
UINT&Pos
instead of
UINT*Pos
), use the files
RTC6impl.hpp
instead of
RTC6impl.h
. Otherwise, the
command import is realized as in C (see above).
C#
For implicit linking of the RTC6 DLL in C# the wrapper
class is provided. It also supports the ’Any CPU’
option for simultaneous usage with 32-bit and 64-bit
programs.
Implicit Linking Explicit Linking
Necessary
Files
RTC6impl.h
or
RTC6impl.hpp
,
RTC6DLL.lib
or
RTC6DLLx64.lib
RTC6expl.h
,
RTC6expl.c
Advantages Easiest linking
method.
Eliminates the
need to link the
user program
with an import
library.
Disadvanta
ges
Users need to link
the user program
to a compiler-
specific import
library.
Users need to
initialize
(
RTC6open
) and
close (
RTC6close
)
the RTC6 DLL.

Table of Contents