[kernel/module.c] Return ERROR_PROC_NOT_FOUND for NULL hModule

Alexandre Julliard julliard at winehq.org
Mon Jul 11 09:07:50 CDT 2005

"Dmitry Timoshkov" <dmitry at baikal.ru> writes:

> 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.

I suspect what is happening here is that GetProcAddress, like most
other kernel functions, treats 0 as meaning 'main exe module', since
passing other invalid module handles results in ERROR_MOD_NOT_FOUND as
expected. Testing this will be a bit tricky since it requires building
an exe with an export table, but that should be feasible with Mingw.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list