Programming Manual
PHYTEC Messtechnik GmbH 2008 L-720e_0
87
P
ro
g
ra
m
m
in
g
M
a
n
u
a
l
6.2.6
Programming under Delphi
In order to utilize the pciGrabber-4x4 with Borland Delphi for user
applications, the driver-DLL with function export
“G
R
4C
DLL
.
DLL
“
should be employed.
To introduce the functions to the DLL in Delphi a corresponding
Unit
has to be defined. Please pay attention to the correct calling sequence,
to guarantee the compatibility of the DLL. Define the functions with
the type
stdcall
. In case of false declarations stack-overflows or -
underflows can occur, which will cause a violation against protected
areas. In the following example a unit is defined:
unit grab4dll;
interface
{ The calling sequence 'stdcall' defines the sequence of the pa-
rameter transfer to the stack and signals to Delphi that the
called function frees the stack region, which was used for the pa-
rameter }
function Grab4_Get_Error: word;
stdcall; external 'gr4cdll.dll' name 'Get_Error';
function Grab4_Max_Device_Number: word;
stdcall; external 'gr4cdll.dll' name
'Max_Device_Number';
function Grab4_Data_Present(nDevNo: word): word;
stdcall; external 'gr4cdll.dll' name 'Data_Present';
function Grab4_GetPictureBufferAddress(nDevNo: word;
dwBitsSize: Cardinal): cardinal;
stdcall; external 'gr4cdll.dll' name 'Data_Present';
procedure Grab4_Initialize(nDevNo: word);
stdcall; external 'gr4cdll.dll' name 'Initialize';
procedure Grab4_Set_Channel(nDevNo, nChannel: word);
stdcall; external 'gr4cdll.dll' name 'Set_Channel';
procedure Grab4_Start_Grabber(nDevNo: word);
stdcall; external 'gr4cdll.dll' name 'Start_Grabber';
procedure Grab4_Stop_Grabber(nDevNo: word);
stdcall; external 'gr4cdll.dll' name 'Stop_Grabber';
Содержание pciGrabber4x4
Страница 1: ...A product of a PHYTEC Technology Holding company Grabber 4x4 Hardware Manual Edition January 2009...
Страница 8: ...pciGrabber 4x4 PHYTEC Messtechnik GmbH 2008 L 720e_0...
Страница 10: ...pciGrabber 4x4 2 PHYTEC Messtechnik GmbH 2008 L 720e_0...
Страница 44: ...pciGrabber 4x4 36 PHYTEC Messtechnik GmbH 2008 L 720e_0...
Страница 73: ...Programming Manual PHYTEC Messtechnik GmbH 2008 L 720e_0 65 Programming Manual Part 2 Programming Manual...
Страница 103: ...Programming Manual PHYTEC Messtechnik GmbH 2008 L 720e_0 95 Programming Manual 0 nDevNo Max_Device_Number are accepted...
Страница 128: ...pciGrabber 4x4 120 PHYTEC Messtechnik GmbH 2008 L 720e_0 Figure 49 Color Format of the pciGrabber 4x4...
Страница 159: ...Index PHYTEC Messtechnik GmbH 2008 L 720e_0 151...