Du darfst es nicht als "array of byte" uebersetzen, da dann zwei intern die Laenge+Groesse des Array uebergeben wird, woduch die Parameter nicht mehr mit dem C header uebereinstimmen. Unter der UniversaAPI koennen maximal 64 Kameras angesprochen werden. Also versuchs mal mit:
Delphi-Quellcode:
type
tPvCameraInfoExList = array[0..63] of tPvCameraInfoEx;
PPvCameraInfoEx = ^tPvCameraInfoEx;
Function PvCameraListEx (pList : PPvCameraInfoEx; ListLength: Cardinal; pConnectedNum : Cardinal; Size : Cardinal) : Cardinal; stdcall; external 'PvAPI.dll';
Var listAVTGigECams : tPvCameraInfoExList ;
valNumberOfCams := PvCameraListEx (@listAVTGigECams, Length(listAVTGigECams), valAvailableCams, SizeOf (tPvCameraInfoEx));
oder
Delphi-Quellcode:
type
tPvCameraInfoExList = array of tPvCameraInfoEx;
PPvCameraInfoEx = ^tPvCameraInfoEx;
Function PvCameraListEx (pList : PPvCameraInfoEx; ListLength: Cardinal; pConnectedNum : Cardinal; Size : Cardinal) : Cardinal; stdcall; external 'PvAPI.dll';
Var listAVTGigECams : tPvCameraInfoExList ;
setLength(listAVTGigECams , 10);
if Length(listAVTGigECams) > 0 then
valNumberOfCams := PvCameraListEx (@listAVTGigECams[0], Length(listAVTGigECams), valAvailableCams, SizeOf (tPvCameraInfoEx));