"Dmitry Timoshkov" dmitry@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.