Re: [kernel/module.c] Return ERROR_PROC_NOT_FOUND for NULL hModule
"Paul Vriens" <paul.vriens(a)xs4all.nl> wrote:
Process Explorer tries to load a dll with LoadLibraryA. This fails and NULL is returned. PE is however still trying to do GetProcAddress on this (not loaded) dll. Windows returns ERROR_PROC_NOT_FOUND, we get into an exception.
I will send a test tonight that confirms the above.
Changelog Return ERROR_PROC_NOT_FOUND if hModule is NULL
Probably the test also should confirm whether it's a responsibility of dlls/ntdll/loader.c,LdrGetProcedureAddress() to return STATUS_ENTRYPOINT_NOT_FOUND which will be converted by GetProcAddress to ERROR_PROC_NOT_FOUND.
-- Dmitry.
Hi Dmitry, how do I make sure that's the case. Obviously a seperate test case for LdrGetProcedureAddress can be made but that doesn't prove your question. Cheers, Paul.
"Paul Vriens" <paul.vriens(a)xs4all.nl> wrote:
how do I make sure that's the case.
Obviously a seperate test case for LdrGetProcedureAddress can be made
That's the only way to [dis]prove that IMO.
but that doesn't prove your question.
Why not, if GetProcAddress is just a wrapper around of LdrGetProcedureAddress? -- Dmitry.
participants (2)
-
Dmitry Timoshkov -
Paul Vriens