> Summing it up: you have to use LongBool (or Windows.Bool) when > translating WinAPI functions that take or return BOOL type. Boolean is > not correct, even if it sometimes works.
Actually, you're right up to a point. You should return BOOL, but a Boolean value will auto convert when assigned a BOOL, hence: function SwitchToThread: BOOL; stdcall; but var res: Boolean; begin res := SwitchToThread; if res then ...; end; _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal