Author: dchapyshev
Date: Wed Apr 15 13:27:59 2009
New Revision: 40522
URL:
http://svn.reactos.org/svn/reactos?rev=40522&view=rev
Log:
- Use SEH in LdrGetProcedureAddress. It fixes an exception in "kernel32_winetest
module" and some wine tests
Modified:
trunk/reactos/dll/ntdll/ldr/utils.c
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Wed Apr 15 13:27:59 2009
@@ -2486,7 +2486,9 @@
DPRINT("LdrGetProcedureAddress (BaseAddress %p Name %Z Ordinal %lu
ProcedureAddress %p)\n",
BaseAddress, Name, Ordinal, ProcedureAddress);
- if (Name && Name->Length)
+ _SEH2_TRY
+ {
+ if (Name && Name->Length)
{
/* by name */
*ProcedureAddress = LdrGetExportByName(BaseAddress, (PUCHAR)Name->Buffer,
0xffff);
@@ -2496,7 +2498,7 @@
}
DPRINT("LdrGetProcedureAddress: Can't resolve symbol
'%Z'\n", Name);
}
- else
+ else
{
/* by ordinal */
Ordinal &= 0x0000FFFF;
@@ -2507,6 +2509,12 @@
}
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;
}