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."
[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366597%28v=vs.85%...
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