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

compn tempn at mi.rr.com
Sun May 17 17:24:36 CEST 2015


On Sun, 17 May 2015 08:07:22 +0200
Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:

> On Sat, May 16, 2015 at 06:27:16PM -0400, compn wrote:
> > any loader devs still around want to clean up and finish this? :)
> 
> I'd doubt it, so I'll just add a few comments.

well, i saw a bunch of your commits and comments to win32.c in the
archives, i was hoping you were that dev.

> 
> > +static int exp_encode_pointer(void *ptr)
> > +{
> > +    dbgprintf("_encode_pointer (0x%08x)\n", ptr);
> > +    return 0;
> > +}
> 
> Should probably just be added anywhere we have
> exp_decode_pointer already

there is  "DecodePointer" and "EncodePointer" , i was just unsure
how to add the alternative spelling of _encode_pointer _decode_pointer.

> 
> > +static const struct exports exp_atl90[]={
> > +    FF(_initterm_e, -1)
> > +    FF(_initterm, -1)
> > +    FF(memset,-1)
> > +};
> 
> Considering they are in MSVCRT I don't think they
> should be here.

right. but i left atl90 struct there so i could add the numerical
exports if i figured that out.

> Also by the messages only numerical exports are used
> (i.e. the thing after the comma where you have all -1s).
> Unfortunately I can't even figure out what atl90.dll actually is...

https://msdn.microsoft.com/en-us/library/ms235624(v=vs.90).aspx
side by side ... visual studio 2008 runtime 
Microsoft.VC90.ATL	atl90.dll	Active Template Library

http://en.wikipedia.org/wiki/Active_Template_Library

> 
> > @@ -5635,6 +5675,80 @@
> >      {"??3 at YAXPAX@Z", -1, expdelete}
> >  };
> >  
> > +static const struct exports exp_msvcr90[]={
> 
> All needed?

probably not.

> I wonder if instead of having different variants
> for all versions (msvcrt, msvcr80, msvcr100) if it
> wasn't possible to do just one that works for all...

i agree, you came up with a half-patch to do it long ago:
http://mplayerhq.hu/pipermail/mplayer-cvslog/2009-September/037502.html

you think we could just put all of the emulated functions under one
struct and that one struct could be all.dll ? it would simplify
things.

-compn


More information about the MPlayer-dev-eng mailing list