http://bugs.winehq.org/show_bug.cgi?id=9056
--- Comment #21 from Anastasius Focht focht@gmx.net 2007-09-25 12:12:05 --- Hello,
--- quote --- My tests thus far show that when FORMAT_MESSAGE_ALLOCATE_BUFFER is specified (like mono does) the API returns ERROR_NOT_ENOUGH_MEMORY in the lpBuffer == NULL case. --- quote ---
ERROR_NOT_ENOUGH_MEMORY == lasterror 0x8?
Interesting. My system: Windows XP SP2 returns last error 0x57 (decimal 87) -> which translates to "invalid parameter". I flipped flags, codes and reset all parameters to zero (FormatMessage( 0,0,...,0)), the last error code remains the same. This can only mean that NULL ptr param check seems to take precedence over other parameter validations.
Please post your exact snippet where you got ERROR_NOT_ENOUGH_MEMORY last error so i can verify it on my system.
Regards