diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-08 22:29:00 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-08 22:29:00 +0000 |
commit | 8021dffeda225f5286a19e2f508540819c5d8d36 (patch) | |
tree | c63808187f87e0b33b600ac35534b55e041efbcf /loader | |
parent | c598146e4aece78c7e018a9af9206a02505c7fc8 (diff) | |
download | mpv-8021dffeda225f5286a19e2f508540819c5d8d36.tar.bz2 mpv-8021dffeda225f5286a19e2f508540819c5d8d36.tar.xz |
Support function lookup via ordinal
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22494 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r-- | loader/win32.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/loader/win32.c b/loader/win32.c index e9038553d3..b195fea2cb 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -2435,7 +2435,10 @@ static void* WINAPI expGetProcAddress(HMODULE mod, char* name) 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* library, const char* name) 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++) |