Ver Mensaje Individual
  #7  
Antiguo 24-08-2010
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
No tenés nada que agradecer.

A ver si con esto solucionamos algo...
Código Delphi [-]
type
  RecSearchEvents = record
    sIMEI: string;
    iCompanyId : integer;
    sVehicleId : string;
    iCurrSpeed,iCurrRPM,iAccDeccValue :integer;
    bDIN1, bDIN2, bDIN3, bDIN4 : Boolean;
    fAIN1, fAIN2,  fAIN3, fAIN4 : Extended;
    iGSMSignal, iCurrentProfile : integer;
    fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage,
    fBatteryVoltage, fBatteryCurrent, fGPSPower, fPCBTemperature,
    fTempSensor1, fTempSensor2, fTempSensor3, fFuelCounter,
    sButtonInput, fCan0, fCan1, fCan2, fCan3, fCan4, fCan5,
    fCan6, fCan7, fCan8,  fCan9 : Extended;
    bGeoZone1, bGeoZone2, bGeoZone3,
    bGeoZone4, bGeoZone5, bGeoZone6, bGeoZone7,
    bGeoZone8, bGeoZone9, bGeoZone10, bGeoZone11,
    bGeoZone12, bGeoZone13, bGeoZone14, bGeoZone15,
    bGeoZone16, bGeoZone17, bGeoZone18, bGeoZone19,
    bGeoZone20 : Boolean;
    fVirtualOdometer : string;
    sCurrOperatorCode : Extended;
    bMovement : Bool
  end;
  TForm1 = class(TForm)
  private
  public
    function SearchEvents(Param: RecSearchEvents): RecSearchEvents;
  end;


var
  Form1: TForm1;

implementation {$R *.dfm}

function TForm1.SearchEvents(Param: RecSearchEvents): RecSearchEvents;
begin
   // Operaciones de la funcion
  Result:= Param;
end;

En este caso pasas y recibis un RecSearchEvents. (o el nombre que quieras darle)
Tenés que cargar los valores en el record antes de llamar a la función por ej:
Código Delphi [-]
var
  rs:RecSearchEvents;
begin
  rs.sIMEI:= '1934102937340';
  rs.iCompanyID:= 11234; 
  ...
  rs:= SearchEvents(rs); // rs, ahora tiene los valores procesados en la función
end;

Nota: No es necesario, pero al ser tantos campos para una mayor claridad quizá te convenga
declarar el registro así:
Código Delphi [-]
  RecSearchEvents = record
    sIMEI: string;
    iCompanyId : integer;
    sVehicleId : string;
    iCurrSpeed, iCurrRPM, iAccDeccValue :integer;
    bDIN: array[1..4] of Boolean;
    bAIN: array[1..4] of Extended;
    iGSMSignal, iCurrentProfile : integer;
    fAcelerometerData, fGPSSpeed,  fPowerSuplyVoltage,
    fBatteryVoltage, fBatteryCurrent, fGPSPower, fPCBTemperature,
    fTempSensor1, fTempSensor2, fTempSensor3, fFuelCounter,
    sButtonInput: Extended;
    fCan: array[0..9] of Extended;
    bGeoZone: array[1..20] of Boolean;
    fVirtualOdometer : string;
    sCurrOperatorCode : Extended;
    bMovement : Bool
  end;

Es mas o ménos lo que buscabas ?

Saludos.

Última edición por ecfisa fecha: 24-08-2010 a las 21:42:37.
Responder Con Cita