{
  Copyright (C)
  2026 - Uladzimir Karpenka, EW8BAK

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  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.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
}

unit Windows;

{
  Заглушка модуля Windows для проверки WINDOWS-ветки на Linux.

  Объявляет РОВНО те имена, которыми настоящий Windows перекрывает SysUtils —
  само перекрытие и ловит ошибки, невидимые на Linux: unit Windows стоит в uses
  ПОСЛЕ SysUtils, поэтому его трёхпараметрический GetEnvironmentVariable
  выигрывает у однопараметрического из SysUtils, и вызов падает с «wrong number
  of parameters». Ровно так win64-сборка и легла.
}

{$MODE Delphi}

interface

type
  DWORD = LongWord;
function GetEnvironmentVariable(lpName, lpBuffer: PChar; nSize: DWORD): DWORD; stdcall;
function QueryPerformanceCounter(var lpPerformanceCount: Int64): LongBool; stdcall;
function QueryPerformanceFrequency(var lpFrequency: Int64): LongBool; stdcall;
function GetTickCount64: QWord; stdcall;
implementation
function GetEnvironmentVariable(lpName, lpBuffer: PChar; nSize: DWORD): DWORD; stdcall;
begin Result := 0; end;
function QueryPerformanceCounter(var lpPerformanceCount: Int64): LongBool; stdcall;
begin lpPerformanceCount := 123456789; Result := True; end;
function QueryPerformanceFrequency(var lpFrequency: Int64): LongBool; stdcall;
begin lpFrequency := 10000000; Result := True; end;
function GetTickCount64: QWord; stdcall;
begin Result := 42; end;
end.
