Einzelnen Beitrag anzeigen

Benutzerbild von KodeZwerg
KodeZwerg

Registriert seit: 1. Feb 2018
3.690 Beiträge
 
Delphi 11 Alexandria
 
#12

AW: Unicode und WideChar API-Funktionen

  Alt 12. Apr 2023, 10:13
Ich habe mal für Dich im Lazarus Forum nachgefragt und die Antwort ist traurig, es geht schlichtweg nicht per switches oder conditionals.

Die einzige Möglichkeit ist es in der "Windows.pp" unit das hier einzufügen (was allerdings gegen die FPC/Lazarus Programmierung Arbeit, also ohne Gewähr!)

Patch:
Delphi-Quellcode:
{
    This file is part of the Free Pascal run time library.
    This unit contains the record definition for the Win64 API
    Copyright (c) 1999-2006 by Florian KLaempfl,
    member of the Free Pascal development team.

    See the file COPYING.FPC, included in this distribution,
    for details about the copyright.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

**********************************************************************}

unit windows;

{$PACKSET 1}

{$ifndef NO_SMART_LINK}
{$smartlink on}
{$endif}

{ stuff like array of const is used }
{$mode objfpc}
{$modeswitch ADVANCEDRECORDS}
{$modeswitch class}
{$inline on}
{$calling stdcall}

{$define FPC_OS_UNICODE} // <<<--- füge das ein

{$ifdef FPC_OS_UNICODE}
  {$define UNICODE}
{$endif}
getestet mit Lazarus 2.3.0 (rev 3bdbedd91b) FPC 3.2.2 x86_64-win64-win32/win64
Gruß vom KodeZwerg
  Mit Zitat antworten Zitat