Re: [fpc-pascal]Win32 API Call

2004-06-24 Thread Michalis Kamburelis
Matt Emson wrote: ... It should be boolean. All Win32API return values which are BOOL translate as Boolean. That's not true. WinAPI uses BOOL type, it's defined in WinAPI headers as typedef int WINBOOL,*PWINBOOL,*LPWINBOOL; ... typedef WINBOOL BOOL; So BOOL is int. So it's 32-bit value on 32-

Re: [fpc-pascal]Win32 API Call

2004-06-24 Thread Matt Emson
> 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 B