Hello,

Changing DELPHI5_UP checks to COMPILER5_UP and DELPHI3_UP to COMPILER3_UP
seems to have worked. NTLM worked fine in my simple test after making the
changes and recompiling ICS.

Also, it seems that StrToIntDef is a supported BCB function as it is in the
documentation and it compiled fine after making the above changes.

Happy to help out. Thanks for the components!

--
Albert Wiersch
AI Internet Solutions
[EMAIL PROTECTED]
http://www.htmlvalidator.com/



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Francois PIETTE
> Sent: Saturday, March 19, 2005 7:42 AM
> To: ICS support mailing
> Subject: Re: [twsocket] THttpCli and BCB Bugs
> 
> 
> > 1. First, this should be defined (not sure at what BCB 
> version though)
> >     {$DEFINE UseNTLMAuthentication}
> 
> Replace the check for DELPHI5_UP by COMPILER5_UP like this:
> {$IFDEF COMPILER5_UP}
>     {$DEFINE UseNTLMAuthentication}
> {$ENDIF}
> 
> > I suspect that code such as this was being compiled by BCB 6 when it
> > shouldn't have for BCB 6:
> 
> Does StrToIntDef exists in BCB6 ?
> 
> >     if Assigned(FRcvdStream) and (FRcvdCount > 0) then
> > {$IFNDEF DELPHI3_UP}
> 
> Can you try using COMPILER3_UP instead of DELPHI3_UP ?
> 
> Thanks for your help.
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
> 
> 
> ----- Original Message ----- 
> From: "Albert Wiersch" <[EMAIL PROTECTED]>
> To: "'ICS support mailing'" <twsocket@elists.org>
> Sent: Friday, March 18, 2005 11:31 PM
> Subject: [twsocket] THttpCli and BCB Bugs
> 
> 
> >
> > I think I got NTLM to work with BCB!
> >
> > It seems there are bugs in HttpProt.pas for BCB compilers.
> >
> > 1. First, this should be defined (not sure at what BCB 
> version though)
> >     {$DEFINE UseNTLMAuthentication}
> >
> > 2. That got NTLM to work, but then I had a weird corruption problem,
> > appearantly caused by using some functions designed for 
> older versions of
> > Delphi which were probably being used by BCB due to the 
> conditionals.
> > Anyway, my "quick" workaround was simply to add this:
> >     {$DEFINE DELPHI3_UP}
> >     {$DEFINE DELPHI4_UP}
> >     {$DEFINE DELPHI5_UP}
> >
> > I'm sure that's not the correct way, but it seems to have 
> fixed my problem
> > by causing the correct code to be compiled.
> >
> > I suspect that code such as this was being compiled by BCB 6 when it
> > shouldn't have for BCB 6:
> >
> > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * * * *
> > *}
> > {$IFNDEF DELPHI5_UP}
> > function StrToIntDef(const S: String; const Default: 
> Integer): Integer;
> > begin
> >     try
> >         Result := StrToInt(S);
> >     except
> >         Result := Default;
> >     end;
> > end;
> > {$ENDIF}
> >
> >
> > And this:
> >
> >
> > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * * * * * * *
> > *}
> > procedure THttpCli.CleanupRcvdStream;
> > begin
> >     { What we are received must be removed }
> >     if Assigned(FRcvdStream) and (FRcvdCount > 0) then
> > {$IFNDEF DELPHI3_UP}
> >     begin
> >         if FRcvdStream is THandleStream then begin
> >             FRcvdStream.Seek(FRcvdStream.Size - FRcvdCount, 0);
> >             FRcvdStream.Write(FRcvdCount, 0);  { Truncate !!! }
> >         end
> >         else if FRcvdStream is TMemoryStream then
> >             TMemoryStream(FRcvdStream).SetSize(FRcvdStream.Size -
> > FRcvdCount);
> >         { Silently fail for other stream types :-( }
> >         { Should I raise an exception ?            }
> >     end;
> > {$ELSE}
> >         FRcvdStream.Size := FRcvdStream.Size - FRcvdCount;
> > {$ENDIF}
> > end;
> >
> > --
> > Albert Wiersch
> > AI Internet Solutions
> > [EMAIL PROTECTED]
> > http://www.htmlvalidator.com/


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to