Menu

#455 The correct support for x64 platform

Not Fixed
open
nobody
None
5
2015-02-22
2014-07-31
Altaveron
No

Please add the correct support for x64 platform. I can provide you required changes. The first block on each source file is a set of original lines. The second block is a set of correct lines. Official documentation can be found here: docwiki.embarcadero.com/RADStudio/XE4/en/Converting_32-bit_Delphi_Applications_to_64-bit_Windows

// 1. SynCompletionProposal.pas

function LogicalToPhysicalIndex(Index: Integer): Integer;
function PhysicalToLogicalIndex(Index: Integer): Integer;
SetWindowLongW(Handle, GWL_WNDPROC, Integer(GetWindowLongA(Handle, GWL_WNDPROC)));
function TSynBaseCompletionProposalForm.LogicalToPhysicalIndex(Index: Integer): Integer;
Result := Integer(FAssignedList.Objects[Index])
function TSynBaseCompletionProposalForm.PhysicalToLogicalIndex(Index: Integer): Integer;
if Integer(FAssignedList.Objects[i]) = Index then
if (InsertList.Count > Integer(Form.FAssignedList.Objects[position])) and
Value := InsertList[Integer(Form.FAssignedList.Objects[position])]

function LogicalToPhysicalIndex(Index: Integer): NativeInt;
function PhysicalToLogicalIndex(Index: NativeInt): Integer;
SetWindowLongPtr(Handle, GWLP_WNDPROC, LONG_PTR(GetWindowLongPtr(Handle, GWLP_WNDPROC)));
function TSynBaseCompletionProposalForm.LogicalToPhysicalIndex(Index: Integer): NativeInt;
Result := NativeInt(FAssignedList.Objects[Index])
function TSynBaseCompletionProposalForm.PhysicalToLogicalIndex(Index: NativeInt): Integer;
if NativeInt(FAssignedList.Objects[i]) = Index then
if (InsertList.Count > NativeInt(Form.FAssignedList.Objects[position])) and
Value := InsertList[NativeInt(Form.FAssignedList.Objects[position])]

// 2. SynDBEdit.pas

Msg.Result := Integer(FDataLink);

Msg.Result := LRESULT(FDataLink);

// 3. SynEdit.pas

SetWindowLongW(Handle, GWL_WNDPROC, Integer(GetWindowLongA(Handle, GWL_WNDPROC)));
SetWindowLongA(Handle, GWL_WNDPROC, Integer(GetWindowLongW(Handle, GWL_WNDPROC)));
WndProc := Pointer(GetWindowLong(hWnd, GWL_WNDPROC));
SetWindowLongPtr(Handle, GWLP_WNDPROC, LONG_PTR(GetWindowLongPtr(Handle, GWLP_WNDPROC)));

SetWindowLongPtr(Handle, GWLP_WNDPROC, LONG_PTR(GetWindowLongPtr(Handle, GWLP_WNDPROC)));
WndProc := Pointer(GetWindowLongPtr(hWnd, GWLP_WNDPROC));
SynEditPrintHeaderFooter.pas
Result := Integer(Item1) - Integer(Item2);
Result := Integer(NativeInt(Item1) - NativeInt(Item2));

// 4. SynEditPrintHeaderFooter.pas

    Result := Integer(Item1) - Integer(Item2);

    Result := Integer(NativeInt(Item1) - NativeInt(Item2));

// 5. SynEditPropertyReg.pas

SetOrdValue(Longint(FUnicodeStrings));
SetOrdValue(Longint(FontDialog.Font));
SetOrdValue(Longint(Dlg.Keystrokes));

SetOrdValue(NativeInt(FUnicodeStrings));
SetOrdValue(NativeInt(FontDialog.Font));
SetOrdValue(NativeInt(Dlg.Keystrokes));

// 6. SynHighlighterCPM.pas

AValue: LongInt;
AValue := Longint(Value);

AValue: NativeInt;
AValue := NativeInt(Value);

// 7. SynMemo.pas

Message.Result := Integer(Modified);
if {$IFNDEF SYN_COMPILER_16_UP}(Message.WParam >= 0) and {$ENDIF}(Integer(Message.WParam) < Lines.Count) then

Message.Result := LRESULT(Modified);
if {$IFNDEF SYN_COMPILER_16_UP}(Message.WParam >= 0) and {$ENDIF}(Message.WParam < Lines.Count) then

// 8. SynUnicode.pas

function WideFileOpen(const FileName: UnicodeString; Mode: LongWord): Integer;
function WideFileCreate(const FileName: UnicodeString): Integer; overload;
function WideFileCreate(const FileName: UnicodeString; Rights: Integer): Integer; overload;
function WideFileOpen(const FileName: UnicodeString; Mode: LongWord): Integer;
Result := Integer(CreateFileW(PWideChar(FileName), AccessMode[Mode and 3],
Result := Integer(CreateFileA(PAnsiChar(AnsiString(FileName)), AccessMode[Mode and 3],
function WideFileCreate(const FileName: UnicodeString): Integer;
Result := Integer(CreateFileW(PWideChar(FileName), GENERIC_READ or GENERIC_WRITE,
Result := Integer(CreateFileA(PAnsiChar(AnsiString(FileName)), GENERIC_READ or GENERIC_WRITE,
function WideFileCreate(const FileName: UnicodeString; Rights: Integer): Integer;
Result := Integer(open(PChar(AnsiString(FileName)), O_RDWR or O_CREAT or O_TRUNC, Rights));

function WideFileOpen(const FileName: UnicodeString; Mode: LongWord): NativeInt;
function WideFileCreate(const FileName: UnicodeString): NativeInt; overload;
function WideFileCreate(const FileName: UnicodeString; Rights: Integer): NativeInt; overload;
function WideFileOpen(const FileName: UnicodeString; Mode: LongWord): NativeInt;
Result := NativeInt(CreateFileW(PWideChar(FileName), AccessMode[Mode and 3],
Result := NativeInt(CreateFileA(PAnsiChar(AnsiString(FileName)), AccessMode[Mode and 3],
function WideFileCreate(const FileName: UnicodeString): NativeInt;
Result := NativeInt(CreateFileW(PWideChar(FileName), GENERIC_READ or GENERIC_WRITE,
Result := NativeInt(CreateFileA(PAnsiChar(AnsiString(FileName)), GENERIC_READ or GENERIC_WRITE,
function WideFileCreate(const FileName: UnicodeString; Rights: Integer): NativeInt;
Result := NativeInt(open(PChar(AnsiString(FileName)), O_RDWR or O_CREAT or O_TRUNC, Rights));

Discussion


Log in to post a comment.

Monday.com Logo