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

Sven Barth pascaldragon at googlemail.com
Mon Feb 6 20:30:45 CET 2012

On 06.02.2012 20:20, Thaddy wrote:
> 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
> wants.
> 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.

There is no option to set anything unicode related in the linker 
according to this page: 

So what are you talking about?


More information about the fpc-devel mailing list