I import one copenttd.dpr from delphi.
Inside delphi32 i can compile , but in lazarus many functions not exists
Soo, I emulate many these function/s , bellow here.
C:Q2=I cannot emulate FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM,nil,rc,?
function Wind_FindClose(hFindFile: THandle): BOOL; stdcall; external ntdll_kernel32 name 'FindClose';
function Wind_SetConsoleTitle(lpConsoleTitle: PAnsiChar): BOOL; stdcall;external ntdll_kernel32 name 'SetConsoleTitleA';
function wind_GetLastError: DWORD; stdcall;external ntdll_kernel32 name 'GetLastError';
function wind_SendMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; external ntdll_kernel32 name 'SendMessageA';
function wind_SetFileAttributesA(lpFileName: PAnsiChar; dwFileAttributes: DWORD): BOOL; stdcall;external ntdll_kernel32 name 'SetFileAttributesA';
C:Q1=How to erase Wind_* (eg. wind_SetConsoleTitle) and I need
put the original names?
GetLastError, SetFileAttributesA, FindClose...
Library copenttd;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
{$apptype console}
Uses
{$IFnDEF FPC}
windows,
{$ELSE}
LCLIntf, LCLType, LMessages,interfaces,
{$ENDIF}
classes,sysutils,
hc_exprecon in 'E:\vlaxcompil\Srcincpa\hc_exprecon.pas',
h_types in 'E:\vlaxcompil\Srcincpa\h_types.pas',
h_aduiport in 'E:\vlaxcompil\Srcincpa\h_aduiport.pas';