Odd problem with process handles

Juan Lang juan_lang at yahoo.com
Sun Apr 24 12:15:01 CDT 2005


Hi Bob,

> hModule is 0xffffffffe and gets dereferenced to find e_magic
> presumably from the psp.

Could you try the following really quick patch?  I have no idea where the
-1 value to GetProcAddress comes from, LoadLibraryA returned NULL.  I'm
also not sure whether the check belongs in here or in GetProcAddress.  But
this might let it get further for you.

Index: dlls/ntdll/loader.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/loader.c,v
retrieving revision 1.87
diff -u -r1.87 loader.c
--- dlls/ntdll/loader.c 21 Mar 2005 10:52:26 -0000      1.87
+++ dlls/ntdll/loader.c 24 Apr 2005 17:09:39 -0000
@@ -2017,6 +2017,8 @@
     const IMAGE_NT_HEADERS *nt;
     DWORD addr;

+    if ( module == (HMODULE)-1 )
+        return NULL;
     if ((ULONG_PTR)module & 1)  /* mapped as data file */
     {
         module = (HMODULE)((ULONG_PTR)module & ~1);


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the wine-devel mailing list