ntdll: Call system hook in LdrResolveDelayLoadedAPI when dll hook is missing
Alexandre Julliard
julliard at winehq.org
Thu Nov 8 13:43:55 CST 2018
André Hentschel <nerv at dawncrow.de> writes:
> @@ -2992,7 +2993,25 @@ fail:
> delayinfo.TargetModuleBase = *phmod;
> delayinfo.Unused = NULL;
> delayinfo.LastError = nts;
> - return dllhook(4, &delayinfo);
> +
> + if (!dllhook && syshook)
> + {
> + if (IMAGE_SNAP_BY_ORDINAL(pINT[id].u1.Ordinal))
> + {
> + DWORD_PTR ord = LOWORD(pINT[id].u1.Ordinal);
> + dllhook = syshook(name, (char*)ord);
> + }
> + else
> + {
> + const IMAGE_IMPORT_BY_NAME* iibn = get_rva(base, pINT[id].u1.AddressOfData);
> + dllhook = syshook(name, (char*)iibn->Name);
> + }
> + }
> +
> + if (dllhook)
> + return dllhook(4, &delayinfo);
> + else
> + return NULL;
Is the syshook really supposed to return another hook? This would need
test cases.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list