Eric Pouech eric.pouech@wanadoo.fr writes:
(Alexandre, in order to handle correctly the loader_critsect between ntdll & kernel32, what do you suggest ? NT does it thru the fastpeblock in the PEB, which we don't implement. shall we add to the PDB in some unused field (which means we do export the PDB struct out of scheduler/process.c, but you seemed to reluctant to do so so far)
Note that the PEB lock and the loader section are not the same thing. The loader section corresponds to the LoaderLock field in the PEB. I think we should use the same thing, and access it like we do for the process heap, at least for now.
+NTSTATUS WINAPI LdrFindEntryForAddress(const void* addr, PLDR_MODULE* mod) +{
- WINE_MODREF* wm;
- NTSTATUS nts = STATUS_NO_MORE_ENTRIES;
- RtlEnterCriticalSection( &loader_section );
- if (!addr)
- {
wm = exe_modref;
- }
This doesn't look right, address 0 is not inside the executable. Are you sure NT does it this way?