Implementing (parts of) BindImageEx

Bernhard Reiter ockham at raz.or.at
Thu Apr 10 17:08:50 CDT 2014


Am 2014-04-10 23:32, schrieb André Hentschel:
> Am 09.04.2014 22:33, schrieb Bernhard Reiter:
>> So I've tried to implement what I've described above, but unfortunately,
>> I can't seem to figure out the very first part required: obtaining
>> something that can be used as the "base" parameter for
>> ImageDirectoryEntryToDataEx from the ImageName string passed to
>> BindImageEx. I've tried LoadLibraryA(ImageName),
>> LoadLibraryExA(ImageName, NULL, LOAD_LIBRARY_AS_DATAFILE), and
>> MapAndLoad(), but unfortunately, all of them seem to either import all
>> the PE's symbols in a fashion that collides with the already loaded ones
>> (in particular in a python-freezing context, like running "wine
>> C:\\Python27\\python.exe setup.py build" with the test case attached to
>> [1]), or not load them in a way that can be used for
>> ImageDirectoryEntryToDataEx. I'm hoping for someone to help me figure
>> out how to do this...
>>
> Have you tried duplicating those functions and adjust them so they don't collide with something? (just as a proof that this will work?)
>
I'm afraid I don't quite understand what you mean by duplicating and
adjusting. (Maybe I should've mentioned that I'm actually pretty much of
a Wine (and Windows API, and PE format) newbie that still has to figure
out his way through theses things; especially all that RVAing still
seems pretty complex to me, and I don't really know how much of it I
need to apply when I'm not going to actually call those imported
functions...)

Anyway, any help very much appreciated!

Bernhard




More information about the wine-devel mailing list