Commit bd17022c authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

kernel32: Set ERROR_DLL_NOT_FOUND as error code in load_library for Win 9x compatibility.

Newer operating systems return ERROR_MOD_NOT_FOUND. Signed-off-by: 's avatarMichael Müller <michael@fds-team.de> Signed-off-by: 's avatarSebastian Lackner <sebastian@fds-team.de> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 11f6df13
......@@ -948,7 +948,10 @@ static HMODULE load_library( const UNICODE_STRING *libname, DWORD flags )
if (nts != STATUS_SUCCESS)
{
hModule = 0;
SetLastError( RtlNtStatusToDosError( nts ) );
if (nts == STATUS_DLL_NOT_FOUND && (GetVersion() & 0x80000000))
SetLastError( ERROR_DLL_NOT_FOUND );
else
SetLastError( RtlNtStatusToDosError( nts ) );
}
done:
HeapFree( GetProcessHeap(), 0, load_path );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment