Menu

Work on 64 bit started

If you have a code base of 32-bit Windows Delphi applications that you want to convert to 64-bit Windows, you should

So its not that easy open your 32-bit application in the IDE, add and activate the 64-bit Windows target platform, and compile your application as a 64-bit Windows application. (For details, see Steps in Creating Multi-Device Applications.)
64bit box

Review and handle the following issues (mostly related to pointer operations, NativeInt size, and Assembly code).

If you pass pointers to SendMessage/PostMessage/TControl.Perform, the wParam and lParam parameters should be type-casted to the WPARAM/LPARAM type and not to Integer/Longint.

Correct:SendMessage(hWnd, WM_SETTEXT, 0, LPARAM(@MyCharArray));
Wrong:SendMessage(hWnd, WM_SETTEXT, 0, Integer(@MyCharArray));

Replace SetWindowLong/GetWindowLog with SetWindowLongPtr/GetWindowLongPtr for GWLP_HINSTANCE, GWLP_ID, GWLP_USERDATA, GWLP_HWNDPARENT and GWLP_WNDPROC as they return pointers and handles. Pointers that are passed to SetWindowLongPtr should be type-casted to LONG_PTR and not to Integer/Longint.

Correct:SetWindowLongPtr(hWnd, GWLP_WNDPROC, LONG_PTR(@MyWindowProc));
Wrong:SetWindowLong(hWnd, GWL_WNDPROC, Longint(@MyWindowProc));

First Version available at: https://sourceforge.net/projects/maxbox/files/Docu/SourceV5/maxbox5.zip/download

Release Notes maXbox 5.0.4.60 Feb. 2024 mX504 beta64-bit uc12
SHA1: 5.0.4.60 maXbox5.exe c0356714e8d67d2f019cc280719eb7b680bb6486
SHA1: ZIP maxbox5.zip 11E64CA885C3CADB1C22EBABEFADE1EAD7E66942

Posted by Max Kleiner 2023-10-06 Labels: 64bit unicode odbc64 oop3
  • Max Kleiner

    Max Kleiner - 2023-10-30

    official 64-bit-box

     
  • Max Kleiner

    Max Kleiner - 2023-11-22

    Now the beta 5.0.2.24 ist released, changed from D10.4 to RAD Studio 11.3 and updated SynEdit, Lockbox and AsyncPro with more Units.
    mX5 Logo

     
  • Max Kleiner

    Max Kleiner - 2023-11-24

    Refined and investigating now an error in wine to start the box
    When we use objects from the VCL or CLX object hierarchies, their properties and methods are not guaranteed to be thread-safe. That is, accessing properties or executing methods may perform some actions that use memory which is not protected from the actions of other threads. Because of this, a main thread is set aside for access of VCL and CLX objects.
    minterror

     

    Last edit: Max Kleiner 2023-11-24
  • Max Kleiner

    Max Kleiner - 2023-12-16

    Release Notes maXbox 5.0.2.40 Dec. 2023 mX502 beta64-bit

     
  • Max Kleiner

    Max Kleiner - 2023-12-28

    Save the code as unicode with
    memo1.lines.savetofile(exepath+'filename');
    you can use writeln('scriptname: '+scriptname) as function to get the filename
    load in memo2 as console with
    if FileToStr(TESTFILE, sr) then
    sr:= StringReplace(utf8decode(sr),LF,CRLF,[rfReplaceAll]);
    writeln(sr)
    writeln('from UTF8 LF to UTF8 CRLF 😀:'+CRLF+CRLF);

    Unicode in Code

    Unicode Encoding Decoding Charset UTF-8 Detection

    In menu ../Options/Saveas Unicode/ you can save code to UTF-8 with one click
    Attention it switches back to ANSI with another click! (no autocheck)
    if file load raise Exception: No mapping for the Unicode character exists
    in the target multi-byte code page at 0.146
    Then you must save the file as utf-8 with notepad or saveStringUC(path):
    procedure SaveString2(const AFile, AText: string);
    procedure SaveString3(const AFile, AText: string; Append: Boolean); //UTF8
    procedure SaveStringUC(const AFile, AText: string; Append: Boolean); //UTF8 - Unicode
    function LoadFile3(const FileName: TFileName): string;
    function LoadFileUC(const FileName: TFileName): string;
    combination test:
    writeln(loadfileUC(ExePath+’upsi_allfunctionslist2.txt’));
    sleep(700)
    savestringUC(ExePath+’upsi_allfunctionslist2save.txt’,
    loadfileUC(ExePath+’upsi_allfunctionslist2.txt’),true) //append
    Charset Function:
    function WideCharsInSet( wcstr:WideString; wcset:TBits):Boolean;
    function JSONUnescape(const Source: string; CRLF: string{ = #13#10}): string;
    function ParseJsonvalue(jsonutf8: string): string;
    procedure setdebugcheck(false);
    Here you can find a completer UTF-8 chars conversion list:
    http://bueltge.de/wp-content/download/wk/utf-8_kodierungen.pdf
    look at in built mX5 class at the bottom
    SIRegister_flcUnicodeCodecs

    Example with CharsetConversion from call to google translator REST API:
    1. trans atext:= 'bonjour mes amis da la ville of coding avec design';
    2. json escaped utf8 ["Hola mis amigos en la ciudad de codificaci\u00c3\u00b3n con dise\u00c3\u00b1o","fr"]
    3. trans back ParseJsonValue(): ["Hola mis amigos en la ciudad de codificación con diseño","fr"]
    writeln('mimecharset '+
    CharsetConversion(ParseJsonValue(Text_to_translate_API2(AURL,'dict-chrome-ex','auto','es',
    (atext))),UTF_8, ISO_8859_1));
    4. mimecharset ["Hola mis amigos en la ciudad de codificación con diseño","fr"]

    Example Parse JSON Array:
    writeln('len node names: '+itoa(ajar.length))
    for it:= 0 to jo2.length-1 do begin
    //writeln(JSONUnescape(jo2.getstring(jo2.keys[it]), #13#10));
    writeln(CharsetConversion(parsejsonvalue(jo2.getstring(jo2.keys[it])),UTF_8,ISO_8859_1));
    //savstr:= savstr + jo2.getstring(jo2.keys[it]);
    savstr:= savstr +CharsetConversion(parsejsonvalue(jo2.getstring(jo2.keys[it])),UTF_8,ISO_8859_1);
    end;

     

    Last edit: Max Kleiner 2024-01-06
  • Max Kleiner

    Max Kleiner - 2024-02-15

    Release Notes maXbox 5.0.4.60 Feb. 2024 mX504 beta64-bit uc12
    SHA1: 5.0.4.60 maXbox5.exe c0356714e8d67d2f019cc280719eb7b680bb6486
    SHA1: ZIP maxbox5.zip 11E64CA885C3CADB1C22EBABEFADE1EAD7E66942

    ODBC 64bit access

     
  • Max Kleiner

    Max Kleiner - 2024-02-26

    XN Resource Editor is now part of it V 5.1.4.70
    XN Resource Editor

     
  • Max Kleiner

    Max Kleiner - 2024-04-28

    maXbox5 beta version 5.1.4.98 III WebUtil Ocean890 26/04/2024 🐞Release
    26.04.2024 11:02
    Release Notes maXbox 5.1.4.98 April 2024 Ocean890
    SHA1: 5.1.4.98 maXbox5.exe cbad754c39b29a7531109cf7a82991652df4db2b
    SHA1: ZIP maxbox5.zip EC4C4D38913DC7B6B61339152CFBB4B7E7368E77

     
  • Max Kleiner

    Max Kleiner - 2024-05-25

    V5.1.4.98 V
    ALFcnSQL
    AlMySqlClient
    ALMySqlWrapper
    PJCBView
    uPSI_ALFcnCGI
    uPSI_ALFcnSQL
    uPSI_AlMySqlClient
    uPSI_DataSetUtils

    V5.1.4.98 VII - 3705 Units
    ESBDates
    GpTimezone
    hhAvALT
    JclPCRE2
    maXbox5_14beta90
    SqlTxtRtns
    uPSI_GpTimezone
    uPSI_hhAvALT
    uPSI_JclPCRE2
    uPSI_SqlTxtRtns

    V5.1.4.98 VIII - 3714 Units
    AsciiShapes
    IdWebSocketSimpleClient
    uPSI_AsciiShapes
    uPSI_IdWebSocketSimpleClient
    uPSI_uWebUIMiscFunctions

    uWebUIConstants
    uWebUILibFunctions
    uWebUIMiscFunctions
    uWebUITypes

    V5.1.4.98 IX - 3720 Units
    ExecuteGLPanel
    ExecuteidWebSocket
    uPSI_ExecuteGLPanel
    uPSI_ExecuteidWebSocket
    Winapi.OpenGL
    Winapi.OpenGLext

    25.05.2024 17:18
    Release Notes maXbox 5.1.4.98 IX May 2024 Ocean950
    SHA1: 5.1.4.98 IX maXbox5.exe d5e5728f0dbfe563ffb8960341cee4949aa6fa31
    SHA1: ZIP maxbox5.zip ABF343E710050CC4C3C0276E2815F7C908C8DC6E
    https://archive.org/details/maxbox5

     

Log in to post a comment.