[MPlayer-dev-eng] [PATCH] [RFC] fix GetModuleHandle(0)
Alan Nisota
alannisota at gmail.com
Sun Mar 18 20:20:44 CET 2007
I am trying to fix GetModuleHanldeA(0) to return the base address of the
calling DLL (in general this should be the base address of the filter
we've loaded. What I really want is the address returned by
LoadLibraryExA, but I'm not sure how I can get at it from this context.
If anyone more familiar with how the library loading works could give
me a hint, I could roll a proper patch
The below patch just hard-codes the value CoreAVC1.3 requires which will
allow the newest CoreAVC filter to run (assuming my prior patches are
applied). It is obviously wrong, but is a band-aid until I can figure
out the right way to fix this.
Index: loader/win32.c
===================================================================
--- loader/win32.c.orig 2007-03-18 11:44:26.000000000 -0700
+++ loader/win32.c 2007-03-18 10:56:49.000000000 -0700
@@ -592,7 +592,7 @@
HMODULE result;
if(!name)
#ifdef QTX
- result=1;
+ result=0x10000000;
#else
result=0;
#endif
More information about the MPlayer-dev-eng
mailing list