[MPlayer-dev-eng] Re: PATCH [8c/12] CoreAVC support (Take 3)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Mar 4 10:08:26 CET 2007


Hello,
On Sat, Mar 03, 2007 at 11:28:20PM -0800, Alan Nisota wrote:
> The original patch has been broken into 3 parts.  this is part 8c
> This patch implements the ability to pass ordinal values to 
> GetProcAddress.  MSDN states that GetProcAddress can take a numeric 
> value as long as the value is in the low-order word, and the high-order 
> word is all zero.
> 

> Index: loader/win32.c
> ===================================================================
> --- loader/win32.c.orig	2007-03-03 23:15:47.000000000 -0800
> +++ loader/win32.c	2007-03-03 23:16:01.000000000 -0800
> @@ -2555,7 +2555,10 @@
>      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;
>  }
>  
> @@ -5573,10 +5576,9 @@
>  	printf("ERROR: library=0\n");
>  	return (void*)ext_unknown;
>      }
> -    if(name==0)
> +    if((unsigned int)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++)

Any objections? If not I intend to apply soon, really shouldn't be able
to break much...

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list