mirror of
https://github.com/reactos/reactos.git
synced 2024-08-29 22:58:34 +00:00
- Use SEH in LdrGetProcedureAddress. It fixes an exception in "kernel32_winetest module" and some wine tests
svn path=/trunk/; revision=40522
This commit is contained in:
parent
8bb2786d95
commit
17e2ab8999
|
@ -2486,7 +2486,9 @@ LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||||
DPRINT("LdrGetProcedureAddress (BaseAddress %p Name %Z Ordinal %lu ProcedureAddress %p)\n",
|
DPRINT("LdrGetProcedureAddress (BaseAddress %p Name %Z Ordinal %lu ProcedureAddress %p)\n",
|
||||||
BaseAddress, Name, Ordinal, ProcedureAddress);
|
BaseAddress, Name, Ordinal, ProcedureAddress);
|
||||||
|
|
||||||
if (Name && Name->Length)
|
_SEH2_TRY
|
||||||
|
{
|
||||||
|
if (Name && Name->Length)
|
||||||
{
|
{
|
||||||
/* by name */
|
/* by name */
|
||||||
*ProcedureAddress = LdrGetExportByName(BaseAddress, (PUCHAR)Name->Buffer, 0xffff);
|
*ProcedureAddress = LdrGetExportByName(BaseAddress, (PUCHAR)Name->Buffer, 0xffff);
|
||||||
|
@ -2496,7 +2498,7 @@ LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||||
}
|
}
|
||||||
DPRINT("LdrGetProcedureAddress: Can't resolve symbol '%Z'\n", Name);
|
DPRINT("LdrGetProcedureAddress: Can't resolve symbol '%Z'\n", Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* by ordinal */
|
/* by ordinal */
|
||||||
Ordinal &= 0x0000FFFF;
|
Ordinal &= 0x0000FFFF;
|
||||||
|
@ -2507,6 +2509,12 @@ LdrGetProcedureAddress (IN PVOID BaseAddress,
|
||||||
}
|
}
|
||||||
DPRINT("LdrGetProcedureAddress: Can't resolve symbol @%lu\n", Ordinal);
|
DPRINT("LdrGetProcedureAddress: Can't resolve symbol @%lu\n", Ordinal);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
/* Ignore exception and return */
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
return STATUS_PROCEDURE_NOT_FOUND;
|
return STATUS_PROCEDURE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue