RemObjects.ins 8.3 with Lazarus

Hi

I installed the new Version and tried to compile but got this Error Message:

Messages, Warnings: 1
Warning: other unit files search path (aka unit path) of "RemObjects_Indy 0.0" contains "C:\Programme_Dev\lazarus\Components\RemObjects SDK for Delphi\Source", which belongs to package "RemObjects_Core"
Hint: (11030) Start of reading config file C:\Programme_Dev\lazarus\IDE\fpc\2.6.4\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file C:\Programme_Dev\lazarus\IDE\fpc\2.6.4\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.6.4 [2015/04/18] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
(1002) Target OS: Win32 for i386
(3104) Compiling RemObjects_Core.pas
(3104) Compiling RemObjects_Core_Reg.pas
(3104) Compiling uROSOAPMessage.pas
(3104) Compiling uROClient.pas
(3104) Compiling uRODL.pas
(3104) Compiling uROClasses.pas
(3104) Compiling uROBinaryMemoryStream.pas
(3104) Compiling uROClasses.pas
(3104) Compiling uROBinaryHelpers.pas
(3104) Compiling uROTypes.pas
(3104) Compiling uRODL.pas
(3104) Compiling uROXMLIntf.pas
(3104) Compiling uROTypes.pas
(3104) Compiling uROSerializer.pas
(3104) Compiling uROClient.pas
(3104) Compiling uROUri.pas
(3104) Compiling uROUrlSchemes.pas
(3104) Compiling uROMessage.pas
(3104) Compiling uROUrlSchemes.pas
(3104) Compiling uROTransportChannel.pas
(3104) Compiling uROBaseConnection.pas
(3104) Compiling uROEncryption.pas
(3104) Compiling .\RODEC\uROCipher.pas
(3104) Compiling .\RODEC\uRODECUtil.pas
C:\Programme_Dev\lazarus\Components\RemObjects SDK for Delphi\Source\.\RODEC\..\RemObjects.inc(208,8) Error: (2067) Mode switch "DELPHI" not allowed here
C:\Programme_Dev\lazarus\Components\RemObjects SDK for Delphi\Source\.\RODEC\uRODECUtil.pas(273,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\Programme_Dev\lazarus\IDE\fpc\2.6.4\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)

Is this a known Problem?
Shalom
Manfred

RODEC is legacy code so we recommend to not use it.

as a workaround, comment RemObjects_UseEncryption definition in RemObjects.inc as:

{.$DEFINE RemObjects_UseEncryption}

Thanks that solved the Problem.

RODEC is legacy code so we recommend to not use it.

Just tried to compile the Component. :wink:
Shalom
Manfred

I can recommend to use TROAESEncryptionEnvelope instead of RODEC.

The Message Envelopes article explains about details.

We use a lot of RODEC encryption for encrypt some data. How can i make RODEC works on latest FPC release?
Any other way to compile this without error, leaving this:

{$DEFINE RemObjects_UseEncryption}

Best regarrds

Example, how can i migrate this code:

function  DesEncriptarArchivoaStream(var MemoryTXT:TMemoryStream; ArchivoEncriptado: AnsiString): boolean;
var
  lEncryption: TROEncryption;
  iCipherText :TFileStream;
begin
  lEncryption := TROEncryption.Create;
  lEncryption.EncryptionMethod := tetBlowfish;
  lEncryption.EncryptionSendKey := FraseEncriptado;
  lEncryption.EncryptionRecvKey := FraseEncriptado;
  if not FileExists(ArchivoEncriptado) then
  begin
    showmessage('No existe el archivo a desencriptar!!!');
    result := False;
    exit;
  end;
  iCipherText := TFileStream.Create(ArchivoEncriptado,fmOpenReadWrite);
  try
    iCipherText.Position := 0;
    lEncryption.Decrypt(iCipherText, MemoryTXT);
    MemoryTXT.Position := 0;
  finally
    FreeAndNil(lEncryption);
    FreeAndNil(iCipherText);
  end;
  Result  := True;
end;

something like:

type 
  TMyEnvelope = class(TROAESEncryptionEnvelope); 

function  DesEncriptarArchivoaStream(var MemoryTXT:TMemoryStream; ArchivoEncriptado: AnsiString): boolean;
var
  lEncryption: TROAESEncryptionEnvelope;
  iCipherText :TFileStream;
begin
  lEncryption := TROAESEncryptionEnvelope.Create;
  lEncryption.Password := FraseEncriptado;
  if not FileExists(ArchivoEncriptado) then
  begin
    showmessage('No existe el archivo a desencriptar!!!');
    result := False;
    exit;
  end;
  iCipherText := TFileStream.Create(ArchivoEncriptado,fmOpenReadWrite);
  try
    iCipherText.Position := 0;
    TMyEnvelope(lEncryption).intProcessIncoming(iCipherText, MemoryTXT,nil); //for encrypting, use intProcessOutgoing
    MemoryTXT.Position := 0;
  finally
    FreeAndNil(lEncryption);
    FreeAndNil(iCipherText);
  end;
  Result  := True;
end;
1 Like