Web lists-archives.com

Re: [MPlayer-dev-eng] how to add lookup / add functions in loader/win32.c ?




On Sat, May 16, 2015 at 06:27:16PM -0400, compn wrote:
> Called unk_ATL90.DLL:15

I don't know how this works, but that entry is a 0 pointer
in the original DLL.
One problem is that we are missing support for pure ordinal
exports without a name, patch below might fix it.
Then something like
{NULL, 15, 0}
might do it (more consistent would be to use (void*)-1 for the last
one, but that way of specifying undefined functions doesn't actually
work for ordinal lookup - looks like a bug).

--- a/loader/win32.c
+++ b/loader/win32.c
@@ -5813,7 +5813,7 @@ void* LookupExternalByName(const char* library, const char* name)
            continue;
        for(j=0; j<libraries[i].length; j++)
        {
-           if(strcmp(name, libraries[i].exps[j].name))
+           if(libraries[i].exps[j].name && strcmp(name, libraries[i].exps[j].name))
                continue;
            if((unsigned int)(libraries[i].exps[j].func) == -1)
                return NULL; //undefined func
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng