[fpc-devel] WinCE port windows.h

Yury Sidorov jura at ce.blagovest.com
Sat Aug 13 19:44:13 CEST 2005


1) The main problem is that Windows unit for win32 is generated 
automatically from GNU headers. Manual modifcations to it will make it 
frozen and make automatic generaton impossible.
I know that WinCE API is very close to Win32 and it is possible to create 
shared Windows unit for Win32, Win64, WinCE by using ifdefs. But what about 
automatic generation?

2) Any needed type definitions can be made directly in Windows unit.

Yury Sidorov.

----- Original Message ----- 
From: "Oro06" <orinaudo at gmail.com>
To: "FPC developers' list" <fpc-devel at lists.freepascal.org>
Sent: Saturday, August 13, 2005 5:58 PM
Subject: Re: [fpc-devel] WinCE port windows.h


1°)actual (wince 4.2) windows.h need at :
windef.h, types.h, winbase.h, wingdi.h, winuser.h, winreg.h, shellapi.h,
ole2.h, imm.h, tchar.h, excpt.h, strsafe.h

actual window.pp (from fpc 2.1.X) look at :
base.inc, errors.inc, defines.inc, struct.inc, messages.inc, ascfun.inc,
unifun.inc, unidef.inc, ascdef.inc, func.inc, redef.inc

considering that :
- many blocks are common, just organized differently (many wince
declarations i just seek in existing win32 code was already there but
in the wrong dir !)
- windows.pp organisation is clearer
- it will be easier to maintain having in the same file, same kind of
code (even for different targets but wince is also 32bits, it's very
close to win32)
- there will also the win64 port question

i propose :
a- move existing win32 files windows.pp + base.inc+errors.inc,
defines.inc, struct.inc, messages.inc, ascfun.inc, unifun.inc,
unidef.inc, ascdef.inc, func.inc, redef.inc
to rtl\win dir
b-add the following defines in every .inc file

in the interface defined block and also in the implementation block

put here all common blocks
{$ifdef WIN32}
at first, put here all existing code, then copy/paste to the common
block according to wince headers
{$endif} //WIN32
{$ifdef WINCE}
put here all wince only code
{$endif} //WINCE

Any comment ?

2°) a type ULONG_PTR is defined in rtl\win\sysosh.inc
with right define depending on 64 or 32 bits
i saw this type only for wince plateform
could it be replaced by PULONG
and ULONG definition added there  ?
there are heavily used by windows
but defined with cardinal type.

regards


_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel






More information about the fpc-devel mailing list