"Detlef Riekenberg" wine.dev@web.de wrote:
else {
ok(GetLastError() == ERROR_INVALID_LEVEL, "wrong error %ld\n", GetLastError());
ok(needed == (DWORD)-1,"not expected needed buffer size %ld\n", needed);
continue;
}
/* ERROR_OUTOFMEMORY from win9x go away, when needed was initiated with 0 */
ok( !ret &&
((GetLastError() == ERROR_INVALID_LEVEL) ||
(GetLastError() == ERROR_OUTOFMEMORY)),
"%d: returned %d with %ld (expected '0' with: " \
"ERROR_INVALID_LEVEL or ERROR_OUTOFMEMORY)\n",
level, ret, GetLastError());
/* needed is modified in win9x. testing for "needed == (DWORD)-1" will fail */
That's interesting, is there a pattern how win9x modifies it?
}
if(GetLastError() != ERROR_INSUFFICIENT_BUFFER) continue;
This line above is misplaced, better do not remove 'continue;' in the invalid level case.