Hi Pierre,
That's interesting, I always assumed it does :/ Sorry for the comment then. BTW, it seems that Wine does the right thing here.
Cheers, Jacek
On 08/02/15 20:16, Pierre Schweitzer wrote:
Hi Jacek,
If this is the Wine behavior, then it's wrong [1]. MSDN states [1]: "If the function fails, it does not call SetLastError. An application cannot call GetLastError for extended error information."
Cheers,
On 08/02/2015 20:02, Jacek Caban wrote:
Hi Pierre,
On 02/08/15 19:59, Pierre Schweitzer wrote:
inf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!inf)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
You don't need to call SetLastError here. It's already set by HeapAlloc on failure.
Jacek