On Monday, 5 August 2013 at 21:42:11 UTC, Kagamin wrote:
On Sunday, 4 August 2013 at 09:28:11 UTC, Denis Shelomovskij wrote:
So I suppose you use `HeapFree` too? Please, be sure you use this Windows API BOOL/BOOLEAN bug workaround:
https://github.com/denis-sh/phobos-additions/blob/e061d1ad282b4793d1c75dfcc20962b99ec842df/unstd/windows/heap.d#L178

BOOLEAN is either TRUE or FALSE, so it should be ok to check only the least significant byte.

Not in Windows:
typedef BYTE BOOLEAN;
typedef int BOOL;

(c) http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx

While ideally it should be TRUE or FALSE, sometimes it isn't.
In fact, for functions that return BOOL, MSDN states the following:
"If the function succeeds, the return value is nonzero."

Reply via email to