[MPlayer-cvslog] r22494 - trunk/loader/win32.c

reimar subversion at mplayerhq.hu
Thu Mar 8 23:29:00 CET 2007


Author: reimar
Date: Thu Mar  8 23:29:00 2007
New Revision: 22494

Modified:
   trunk/loader/win32.c

Log:
Support function lookup via ordinal


Modified: trunk/loader/win32.c
==============================================================================
--- trunk/loader/win32.c	(original)
+++ trunk/loader/win32.c	Thu Mar  8 23:29:00 2007
@@ -2435,7 +2435,10 @@ static void* WINAPI expGetProcAddress(HM
     default:
 	result=GetProcAddress(mod, name);
     }
-    dbgprintf("GetProcAddress(0x%x, '%s') => 0x%x\n", mod, name, result);
+    if((unsigned int)name > 0xffff)
+	dbgprintf("GetProcAddress(0x%x, '%s') => 0x%x\n", mod, name, result);
+    else
+	dbgprintf("GetProcAddress(0x%x, '%d') => 0x%x\n", mod, (int)name, result);
     return result;
 }
 
@@ -5419,10 +5422,9 @@ void* LookupExternalByName(const char* l
 	printf("ERROR: library=0\n");
 	return (void*)ext_unknown;
     }
-    if(name==0)
+    if((unsigned long)name<=0xffff)
     {
-	printf("ERROR: name=0\n");
-	return (void*)ext_unknown;
+	return LookupExternal(library, (int)name);
     }
     dbgprintf("External func %s:%s\n", library, name);
     for(i=0; i<sizeof(libraries)/sizeof(struct libs); i++)



More information about the MPlayer-cvslog mailing list