eGrabber-4plus
96
PHYTEC Meßtechnik GmbH 2004 L-608e_4
5.2.6
Programming under Delphi
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’;
Содержание eGrabber-4plus
Страница 1: ...A product of a PHYTEC Technology Holding company eGrabber 4plus Hardware Manual Edition June 2004 ...
Страница 8: ...eGrabber 4plus PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 10: ...eGrabber 4plus PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 56: ...eGrabber 4plus 46 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 80: ...eGrabber 4plus 70 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 81: ...Part 2 Programmer s Manual PHYTEC Meßtechnik GmbH 2004 L 608e_4 71 Part 2 Programmer s Manual ...
Страница 82: ...eGrabber 4plus 72 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 137: ...Driver Software PHYTEC Meßtechnik GmbH 2004 L 608e_4 127 Figure 52 Color Format of the eGrabber 4plus ...
Страница 188: ...eGrabber 4plus 178 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 192: ...eGrabber 4plus 182 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 204: ...eGrabber 4plus 194 PHYTEC Meßtechnik GmbH 2004 L 608e_4 ...
Страница 206: ...Published by PHYTEC Meßtechnik GmbH 2004 Ordering No L 608e_4 Printed in Germany ...