EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Another Indy question

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#20964
Posted: 08/01/2012 07:40:31
by Ciaran Costelloe (Standard support level)
Joined: 07/10/2009
Posts: 26

Yes, you can get into a mess if you are not careful installing Indy, but I am fairly at ease doing that now.

I need to retrace my steps: even though I only bought it a few weeks ago, somehow I have keys for SBB9 and SBB10 but only a download for SBB9. Something stupid I did.

Thanks,

Ciaran
#20965
Posted: 08/01/2012 07:42:34
by Eugene Mayevski (EldoS Corp.)

Source code downloads are not available for version 10 yet as its in beta state now.

But in any case the problem is local to your computer and is likely caused by mess with Indy versions - SVN snapshot of Indy 10 works ok with SBB 9.1.216 in Delphi 2007.


Sincerely yours
Eugene Mayevski
#21025
Posted: 08/12/2012 19:48:36
by Ciaran Costelloe (Standard support level)
Joined: 07/10/2009
Posts: 26

Reinstalled everything, including the current Indy10, on a clean computer, but still got the error:

[DCC Error] SBIndyIOHandler10.pas(682): E2009 Incompatible types: 'Parameter lists differ'
...on line 682:
FSecureClient.OnReceive := OnSecureClientReceive;
(the last param, Written, is an integer on the left-hand side but an integer@ on the right-hand side).

This is a Secure BlackBox issue, not an Indy one.
#21026
Posted: 08/13/2012 01:26:25
by Eugene Mayevski (EldoS Corp.)

Please change parameter modifier in the last parameter of OnSecureClientReceive method from out to var or vice versa. The problem there comes from Borland who made a real mess with the language at times of BDS 2006 and CRS 2007.


Sincerely yours
Eugene Mayevski
#21027
Posted: 08/13/2012 01:49:52
by Eugene Mayevski (EldoS Corp.)

I've checked the current source code and it doesn't have this problem as defines have been corrected there to count CRS 2007 properly.


Sincerely yours
Eugene Mayevski
#21030
Posted: 08/13/2012 16:45:48
by Ciaran Costelloe (Standard support level)
Joined: 07/10/2009
Posts: 26

Thanks, what worked is as follows.

In SBIndyIOHandler.pas, the original code is:

Code
procedure TElClientIndySSLIOHandlerSocket.OnSecureClientReceive(Sender : TObject;
  Buffer : pointer; MaxSize : longint;
  {$ifndef BUILDER_USED}  out{$else} var{$endif} Written : integer);


It compiles if I change it to the following:
Code
procedure TElClientIndySSLIOHandlerSocket.OnSecureClientReceive(Sender : TObject;
  Buffer : pointer; MaxSize : longint;
  out Written : integer);  


So it looks like BUILDER_USED is defined in SBIndyIOHandler.pas at the top of this file(which is what I would expect), but it is NOT defined in SBSSLCommon.pas so the following line uses "out" instead of "var":
Code
  TSBReceiveEvent = procedure(Sender: TObject; Buffer: pointer;
    MaxSize: longint; {$IFNDEF BUILDER_USED}out {$ELSE}var {$ENDIF} Written: longint) of object;


Don't know if this helps you.

Ciaran
#21031
Posted: 08/13/2012 23:57:15
by Eugene Mayevski (EldoS Corp.)

That is part of the mess Borland created -- in CRS 2007 they have both VER180 and VER185 defined, so defines for BDS 2006 (where BUILDER_USED was always defined, since one set of units was used for both Delphi and C++Builder - another part of the mess) are active. This has been fixed, but maybe not all defines were updated in all units. As you can see, we need to include those defines in each file and maybe they were not updated in time (i.e. the main include file was updated, but some Indy unit was not).


Sincerely yours
Eugene Mayevski
#21244
Posted: 08/30/2012 00:02:48
by Alexey Parshin (Basic support level)
Joined: 08/29/2012
Posts: 4

We just bought SBB and I'm trying to compile it against Indy 10.5.9, installed from the latest sources, in BDS2006.
I got the same error as mentioned here (in SBIndySSHClientIOHandler10.pas),

function ReadFromSource(ARaiseExceptionIfDisconnected: Boolean;
ATimeout: Integer; ARaiseExceptionOnTimeout: Boolean): Integer; override;

[Pascal Error] SBIndySSHClientIOHandler10.pas(254): E2170 Cannot override a non-virtual method

Deplhi uses correct version of Indy. I looked in the base class, in Indy (10.5.9), and it isn't virtual. Just to make sure that Delphi uses the right Indy, I've modified Indy source in Core/IdIoHandler.pas by adding virtual to the method ReadFromSource. That error goes away immediately, leaving another method, WriteDirect, with similar problem.

I don't want to modify Indy source unless it's absolutely necessary.

Please, advise.
#21249
Posted: 08/30/2012 01:43:58
by Eugene Mayevski (EldoS Corp.)

Please re-check instructions in the beginning of the IOHandler file. You have not uncommented right defines there.


Sincerely yours
Eugene Mayevski
#21285
Posted: 08/30/2012 18:16:24
by Alexey Parshin (Basic support level)
Joined: 08/29/2012
Posts: 4

Ok, {$define INDY1023} in most cases (instead of 1055) got modules I need to compile.

Now, in our code we used to use TElIndySSLIOHandlerSocket component (based on Indy 9). The nearest equivalent in Indy 10 version is TElClientIndySSLIOHandlerSocket. Unfortunately, since it's based on TIdSSLIOHandlerSocketBase, the former SSLOptions property isn't available anymore (since it's a part of TIdSSLIOHandlerSocketOpenSSL). So, how do we set ssl options now?
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 7982 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!