>> 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

Reply via email to