[fpc-devel] Changing Windows API A routines in SysUtils to W in Windows NT

Thaddy thaddy at thaddy.com
Mon Feb 6 20:20:31 CET 2012

On 6-2-2012 19:54, Felipe Monteiro de Carvalho wrote:
> The Microsoft way is not the same as the Free Pascal way. We are not 
> required to immitate them when implementing our routines. The 
> Microsoft way has nasty side effects: 1> makes it impossible to 
> support Unicode and support Windows 9x at the same time, but I doubt 
> that Free Pascal wants to drop Windows 9x support (even if it is 
> obsolete). 2> Breaks the interface because the string type changed 

No, this is not true, not at all, to the contrary, that's what the PE 
flag is for:

If you want to compile for any windows version, choose ansi mode and the 
OS "respects" and "expects" that.
If you want a unicode default (i.e. win2000 and higher) choose unicode mode.
The library should be totally opaque when the programmer decides what he 
What you are doing is making changes in the generated code that shoukld 
be resolved at compile time.
This can be resolved at link time, but I expect it should be resolved at 
compile time.
That's why I agree with you that changes are necessary.
(Although the PE flag is a linker instruction)

What we are required to do is respect the OS we compile for.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2768 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120206/d072c7e6/attachment.bin>

More information about the fpc-devel mailing list