Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Tobias Rapp
Angus Robertson wrote:
> > Maybe it's time to check all our projects for 64-bit compatibility? 
> > :)
> 
> Only if your ICS project needs to access more than 2 gigs of memory (or
> is it 4), or is a DLL called by other 64-bit applications.  

When working with Windows messages I often use a pattern like

type
   tMyMsgData = record
  Value1, Value2, Value3 : string;
   end;
   pMyMsgData = ^tMyMsgData;

var
   Msg : pMyMsgData;
begin
   New(Msg);
   Msg^.Value1 := 'hello';
   Msg^.Value1 := 'world';
   ...
   PostMessage(Handle, WM_MY_MSG, integer(Msg), 0);
   ...
end;

I guess that won't work with 64bit-Delphi because I cannot cast a pointer
into an integer. Will I have to split the pointer into Int64Rec.Lo/Hi? Any
ideas?

Regards,
Tobias

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Fastream Technologies
Hello,
On Wed, Apr 6, 2011 at 10:11 AM, Tobias Rapp  wrote:

> Angus Robertson wrote:
> > > Maybe it's time to check all our projects for 64-bit compatibility?
> > > :)
> >
> > Only if your ICS project needs to access more than 2 gigs of memory (or
> > is it 4), or is a DLL called by other 64-bit applications.
>
> When working with Windows messages I often use a pattern like
>
> type
>   tMyMsgData = record
>  Value1, Value2, Value3 : string;
>   end;
>   pMyMsgData = ^tMyMsgData;
>
> var
>   Msg : pMyMsgData;
> begin
>   New(Msg);
>   Msg^.Value1 := 'hello';
>   Msg^.Value1 := 'world';
>   ...
>   PostMessage(Handle, WM_MY_MSG, integer(Msg), 0);
>   ...
> end;
>
> I guess that won't work with 64bit-Delphi because I cannot cast a pointer
> into an integer. Will I have to split the pointer into Int64Rec.Lo/Hi? Any
> ideas?
>
> Regards,
> Tobias
>

Since integer and pointer are both 8-bytes in x64, I think it would work.

Regards,

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Arno Garrels
Tobias Rapp wrote:

>   PostMessage(Handle, WM_MY_MSG, integer(Msg), 0);
>   ...
> end;
> 
> I guess that won't work with 64bit-Delphi because I cannot cast a
> pointer into an integer. Will I have to split the pointer into
> Int64Rec.Lo/Hi? 

No, WPARAM and LPARAM are 64-bit in WIN64 so just cast the pointer to 
WParam in your sample.
PostMessage(Handle, WM_MY_MSG, WParam(Msg), 0);

NativeInt and NativeUInt are Delphi's integer types that always have
the size of a Pointer. Integer will _not change of course.

-- 
Arno Garrels

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Primoz Gabrijelcic
>> Angus Robertson wrote:
>> > > Maybe it's time to check all our projects for 64-bit compatibility?
>> > > :)
>> >
>> > Only if your ICS project needs to access more than 2 gigs of memory (or
>> > is it 4), or is a DLL called by other 64-bit applications.
>>
>> When working with Windows messages I often use a pattern like
>>
>> type
>>   tMyMsgData = record
>>  Value1, Value2, Value3 : string;
>>   end;
>>   pMyMsgData = ^tMyMsgData;
>>
>> var
>>   Msg : pMyMsgData;
>> begin
>>   New(Msg);
>>   Msg^.Value1 := 'hello';
>>   Msg^.Value1 := 'world';
>>   ...
>>   PostMessage(Handle, WM_MY_MSG, integer(Msg), 0);
>>   ...
>> end;
>>
>> I guess that won't work with 64bit-Delphi because I cannot cast a pointer
>> into an integer. Will I have to split the pointer into Int64Rec.Lo/Hi? Any
>> ideas?
>>
>> Regards,
>> Tobias
>>

> Since integer and pointer are both 8-bytes in x64, I think it would work.

Integer  is  4 bytes on both 32 and 64 bits. Int64 is 8 bytes on both.
NativeInt/NativeUInt is 4 bytes on 32 and 8 bytes on 64.

WPARAM  and  LPARAM  message types are defined as NativeInt so you can
cast a pointer to them.

Primoz

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Stefan Paege
> >   PostMessage(Handle, WM_MY_MSG, integer(Msg), 0);
> >   ...
> > end;
> >
> > I guess that won't work with 64bit-Delphi because I cannot cast a
> pointer
> > into an integer. Will I have to split the pointer into
> Int64Rec.Lo/Hi? Any
> > ideas?
> >
> > Regards,
> > Tobias
> >
> 
> Since integer and pointer are both 8-bytes in x64, I think it would
> work.

No, Integer remains 4 Byte in x64.
But Using NativeInt should work on both 32 and 64 bit.

Regards
  Stefan Paege


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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Tobias Rapp
Arno Garrels wrote:
> No, WPARAM and LPARAM are 64-bit in WIN64 so just cast the pointer to 
> WParam in your sample.
> PostMessage(Handle, WM_MY_MSG, WParam(Msg), 0);

Oh, that's fine!

> NativeInt and NativeUInt are Delphi's integer types that always have
> the size of a Pointer. Integer will _not change of course.

Just noticed that even my Delphi 2006 supports NativeInt. Will use it for
pointer/handle casting related code whenever I stumble over it now.

Regards,
Tobias

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Fastream Technologies
On Wed, Apr 6, 2011 at 10:50 AM, Stefan Paege  wrote:

> > >   PostMessage(Handle, WM_MY_MSG, integer(Msg), 0);
> > >   ...
> > > end;
> > >
> > > I guess that won't work with 64bit-Delphi because I cannot cast a
> > pointer
> > > into an integer. Will I have to split the pointer into
> > Int64Rec.Lo/Hi? Any
> > > ideas?
> > >
> > > Regards,
> > > Tobias
> > >
> >
> > Since integer and pointer are both 8-bytes in x64, I think it would
> > work.
>
> No, Integer remains 4 Byte in x64.
> But Using NativeInt should work on both 32 and 64 bit.
>
> Regards
>   Stefan Paege
>

Ok, but in C++ Builder a declaration such as,

int i;

is 8 bytes--at least so in VC++.

For the Delphi ICS code, I think all the necessary integers have already
been converted to int64's.

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Arno Garrels
Fastream Technologies wrote:
> 
> Ok, but in C++ Builder a declaration such as,
> 
> int i;
> 
> is 8 bytes--at least so in VC++.

No, have a look here : http://en.wikipedia.org/wiki/64-bit
Topic "64-bit data models"
In Windows and Unix-like systems an int remains 32-bit.

BTW: According to the roadmap C++ Builder will not yet
support Windows 64-bit in Pulsar.
http://edn.embarcadero.com/article/39934
Looks like you have to wait for Wheelhouse.

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Fastream Technologies
Thanks for the links. It seems you are right. Too bad that C++ is once again
the step-child of Borland/Embarcadero...

SubZero
On Wed, Apr 6, 2011 at 12:16 PM, Arno Garrels  wrote:

> Fastream Technologies wrote:
> >
> > Ok, but in C++ Builder a declaration such as,
> >
> > int i;
> >
> > is 8 bytes--at least so in VC++.
>
> No, have a look here : http://en.wikipedia.org/wiki/64-bit
> Topic "64-bit data models"
> In Windows and Unix-like systems an int remains 32-bit.
>
> BTW: According to the roadmap C++ Builder will not yet
> support Windows 64-bit in Pulsar.
> http://edn.embarcadero.com/article/39934
> Looks like you have to wait for Wheelhouse.
>
> --
> Arno Garrels
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Anton S.
Angus
>Only if your ICS project needs to access more than 2 gigs of memory (or
>is it 4), or is a DLL called by other 64-bit applications.  
Well, native apps get more efficiency anyway.

>ICS is currently being tested for 64-bit computability, which
>unfortunately means replacing 32-bit assembler.
I guess asm blocks could be adopted to x64 too. Emb-ro advices to reject asm at 
all though.

I examined the ICS units some time ago and found only several places that *may* 
require changing. But maybe WinSock wrappers would require it as Windows' types 
lika UINT, LRESULT etc are used quite rarely, most coders use general integer 
types instead.

Tobias
>When working with Windows messages I often use a pattern like...
Well, they paid a special attention of "message crackers" in the preview video. 
They are likely to be changed.

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


Re: [twsocket] File transfer through SSL

2011-04-06 Thread Francois PIETTE
Do we have any kind of demo project of how to upload stuff to the server 
by using ssl and how to download from the server?

This is something that I also very much would like to know about.


You have two demos: client (OverbyteIcsHttpsTst.dproj) and server 
(OverbyteIcsHttpsServer). Both are located under dir>\Delphi\SslInternet


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

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


Re: [twsocket] File transfer through SSL

2011-04-06 Thread daniel cc

Thanks Francois :)
I will check them out.



-Original Message- 
From: Francois PIETTE 
Sent: Wednesday, April 06, 2011 2:36 PM 
To: ICS support mailing 
Subject: Re: [twsocket] File transfer through SSL 

Do we have any kind of demo project of how to upload stuff to the server 
by using ssl and how to download from the server?

This is something that I also very much would like to know about.


You have two demos: client (OverbyteIcsHttpsTst.dproj) and server 
(OverbyteIcsHttpsServer). Both are located under dir>\Delphi\SslInternet


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Angus Robertson - Magenta Systems Ltd
> I examined the ICS units some time ago and found only several 
> places that *may* require changing.

Most people are aware that Embarcadero does not allow it's beta testers
to identify themselves except under limited circumstances, nor talk about
beta products.   

But since ICS and many other components are always ready for new Delphi
releases, some people may assume that one or more of us have access to
new Delphi code before it's release, to update and test components as
necessary.  

Hypothetically, limited testing of ICS under 64-bit may have been done
successfully already.  If the annual Delphi release schedule of August or
September is followed again this year, a lot may still change.   

There have been over 200 messages about 64-bit in the non-technical
newsgroup over the last two days, with various suggestions that may get
taken up and cause more changes. 

Embarcadero is accepting applications for beta access on it's 64-bit web
page, and such people could similarly get access to test ICS. 

Angus

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread TK Boyd
Given Embarcadero's total distain for "the little folk", I hope ICS 
will continue to leave versions of the ICS which are compatible with 
Delphi 4 and Delphi 7 on the ICS website, for those of us still doing 
productive work on the "early" Delphis which can... shock horror!... 
still be installed on systems simply by entering a registration key, 
rather than via an online registration process which leaves the 
package owner vulnerable to the marketing choices of the software 
producer.

As Kylix seems "dead", I hope Lazarus is thriving, and that a version 
of ICS which works with that is/ will remain available... but will 
understand that if Lazarus is NOT doing well, the energy to support 
it cannot be justified.

Tom

On 6 Apr 2011 at 14:28, Angus Robertson - Magenta Systems Ltd wrote:

> > I examined the ICS units some time ago and found only several 
> > places that *may* require changing.
> 
> Most people are aware that Embarcadero does not allow it's beta testers
> to identify themselves except under limited circumstances, nor talk about
> beta products.   
> 
> But since ICS and many other components are always ready for new Delphi
> releases, some people may assume that one or more of us have access to
> new Delphi code before it's release, to update and test components as
> necessary.  
> 
> Hypothetically, limited testing of ICS under 64-bit may have been done
> successfully already.  If the annual Delphi release schedule of August or
> September is followed again this year, a lot may still change.   
> 
> There have been over 200 messages about 64-bit in the non-technical
> newsgroup over the last two days, with various suggestions that may get
> taken up and cause more changes. 
> 
> Embarcadero is accepting applications for beta access on it's 64-bit web
> page, and such people could similarly get access to test ICS. 
> 
> Angus
> 
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be



http://sheepdogsoftware.co.uk  TK Boyd's site with
freeware and shareware for kids, parents, schools... and others.

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Dimitris Botsis

I agree, it would be great if ICS could be used from Lazarus.
Lazarus seems to go well, new versions are coming, community gets bigger 
- and also Freepascal is great (referring to previous subject it 
supports 64bit systems too)


On 6/4/2011 5:20 μμ, TK Boyd wrote:

Given Embarcadero's total distain for "the little folk", I hope ICS
will continue to leave versions of the ICS which are compatible with
Delphi 4 and Delphi 7 on the ICS website, for those of us still doing
productive work on the "early" Delphis which can... shock horror!...
still be installed on systems simply by entering a registration key,
rather than via an online registration process which leaves the
package owner vulnerable to the marketing choices of the software
producer.

As Kylix seems "dead", I hope Lazarus is thriving, and that a version
of ICS which works with that is/ will remain available... but will
understand that if Lazarus is NOT doing well, the energy to support
it cannot be justified.

Tom

On 6 Apr 2011 at 14:28, Angus Robertson - Magenta Systems Ltd wrote:


I examined the ICS units some time ago and found only several
places that *may* require changing.


Most people are aware that Embarcadero does not allow it's beta testers
to identify themselves except under limited circumstances, nor talk about
beta products.

But since ICS and many other components are always ready for new Delphi
releases, some people may assume that one or more of us have access to
new Delphi code before it's release, to update and test components as
necessary.

Hypothetically, limited testing of ICS under 64-bit may have been done
successfully already.  If the annual Delphi release schedule of August or
September is followed again this year, a lot may still change.

There have been over 200 messages about 64-bit in the non-technical
newsgroup over the last two days, with various suggestions that may get
taken up and cause more changes.

Embarcadero is accepting applications for beta access on it's 64-bit web
page, and such people could similarly get access to test ICS.

Angus

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




http://sheepdogsoftware.co.uk  TK Boyd's site with
freeware and shareware for kids, parents, schools... and others.

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




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

Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Angus Robertson - Magenta Systems Ltd
> I hope ICS 
> will continue to leave versions of the ICS which are compatible 
> with Delphi 4 and Delphi 7 on the ICS website

The latest ICS V6 and V7 are still fully compatible with Delphi 7 and
2007, and will remain so, since Arno uses the former and I the latter
(and have some old D7 projects).  Few people want to update major old
projects to Unicode so support for these is essential for years to come. 

Earlier Delphi releases are more problematic, since Borland was still
adding language features like int64, 64-bit streams and dynamic arrays.
ICS V5 still supports Delphi 6 and earlier, but only gets bug fixes for
serious issues. 

> As Kylix seems "dead", I hope Lazarus is thriving

The Embarcadero roadmap for future releases shows:

- Delphi 64 bit
- Mac OSX support
- Server Linux support
- GUI linux support 

and if you look in the source code for the Delphi XE libraries, you will
find a lot of conditional code such as: 

{$IFDEF LINUX}
  ExeBaseAddress = Pointer($8048000) platform;
{$ENDIF}
{$IFDEF MACOS}
  ExeBaseAddress = Pointer($1) platform;
{$ENDIF}
{$IF defined(CPUX64)}
  FSSegBase: Pointer = nil; 
{$IFEND}
{$IFDEF POSIX}
procedure _GetCallerEIP;
{$ENDIF POSIX}

so I think you can assume that a lot of work has already been done on
these implementations by Embarcadero.  

The main issue with Linux/Mac is the same as Kylix, which is no windows
events and no VCL, which makes supporting these from the same ICS code
base as Windows very difficult. 

Angus

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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 
> The latest ICS V6 and V7 are still fully compatible with Delphi 7 and
> 2007, and will remain so, since Arno uses the former and I the latter
> (and have some old D7 projects).  

Don't rely on that for ever, I'm currently porting old apps. to XE.

> Few people want to update major old
> projects to Unicode so support for these is essential for years to
> come.

Well, if they don't they will lose customers sooner or later, not just
due to missing Unicode but also 64-bit that will be the standard very 
soon. The longer they wait the more difficult becomes porting old
code to a current Delphi version. 

-- 
Arno Garrels





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


Re: [twsocket] [OT] 64-bit Delphi preview

2011-04-06 Thread Angus Robertson - Magenta Systems Ltd
> Well, if they don't they will lose customers sooner or later, not 
> just due to missing Unicode

I was referring to existing custom written applications not using Unicode
since we've managed without it in the USA and Europe for the past 30
years of computing.  

If you try and tell a customer you want to charge him 30 man days work to
update, test and roll out a large custom application suite for a new
Delphi compiler to support Unicode, he will just laugh.   

Angus

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