1
General / compiler error in unit
« Last post by paule32 on Today at 01:36:37 pm »Hello,
during compile, I stuck on line: 57 (see attached image).
I get the compiler error:
FPC_WinTypes.pas(57) Fatal: Syntax error, "UNIT" expected but "end of file" found
And this is the content:
So, what is going on ?
during compile, I stuck on line: 57 (see attached image).
I get the compiler error:
FPC_WinTypes.pas(57) Fatal: Syntax error, "UNIT" expected but "end of file" found
And this is the content:
- // ---------------------------------------------------------------------------
- // File: FPC_WinTypes.pas
- // Author: (c) 2024 Jens Kallup - paule32
- // All rights reserved
- //
- // only for education, and non-profit usage !
- // ---------------------------------------------------------------------------
- unit FPC_WinTypes;
- interface
- uses fpc_types;
- // ---------------------------------------------------------------------------
- // win32api constants, and variables ...
- // ---------------------------------------------------------------------------
- type BOOL = LongBool; // true or false
- type PVOID = Pointer;
- type LPVOID = ^PVOID;
- type LPCVOID = ^LPVOID;
- type HANDLE = PVOID;
- type FARPROC = PVOID;
- type THANDLE = DWORD; // onject handle
- type PHandle = ^THANDLE;
- type LCID = DWord; // a local identifier
- type LANGID = DWord; // a language identifier
- type WPARAM = DWord; // 32-bit message parameter
- type LPARAM = DWord; // 32-bit message parameter
- type LRESULT = DWord; // 32-bit unsigned return value
- type HRESULT = DWord; // 32-bit signed return value
- type HINSTANCE = HANDLE; // a handle to an instance
- type HLOCAL = HANDLE; // a handle to a local memory block
- type HMODULE = HINSTANCE; // a handle to a module (.dll)
- type HWND = DWord; // a handle to a window
- type ATOM = DWord; // local/global atom index for a string
- type HGLOBAL = THandle; // a globally memory allocated handle
- type PAnsiString = ^AnsiString;
- type LPCSTR = PAnsiString;
- type LPCWSTR = PAnsiString;
- //type FARPROC = Pointer;
- type LPCTSTR = LPCSTR;
- type LONG_PTR = DWORD;
- type PLONC_PTR = ^LONG_PTR;
- type
- PPoint = ^TPoint;
- TPoint = record
- x: DWORD;
- y: DWORD;
- end;
- type
- PMessage = ^TMessage;
- TMessage = record
- hwnd : HWND;
- message : DWORD;
- wParam : WPARAM;
- lParam : LPARAM;
- time : DWORD;
- pt : TPOINT;
- lPrivate : DWORD;
- end;
- // ---------------------------------------------------------------------------
- // security structures ...
- // ---------------------------------------------------------------------------
- type
- POverlapped = ^TOverlapped;
- _OVERLAPPED = record
- Internal : ^DWORD ;
- InternalHigh : ^DWORD ;
- Offset : DWORD ;
- OffsetHigh : DWORD ;
- hEvent : THandle;
- end;
- TOverlapped = _OVERLAPPED;
- PSECURITY_ATTRIBUTES = ^TSECURITYATTRIBUTES;
- LPSECURITY_ATTRIBUTES = ^TSECURITYATTRIBUTES;
- PSecurityAttributes = ^TSecurityAttributes;
- TSECURITYATTRIBUTES = record
- nLength : DWORD ;
- lpSecurityDescriptor : Pointer;
- bInheritHandle : BOOL ;
- end;
- implementation
- end.
So, what is going on ?