imagehlp: Implement (parts of) BindImageEx

Bernhard Reiter ockham at
Sat Aug 16 14:43:21 CDT 2014

Am 2014-08-16 um 14:02 schrieb Thomas Faber:
> On 2014-08-12 19:34, Bernhard Reiter wrote:
>> But I've substituted a PULONG here for an unsigned long * -- is that
>> wrong? Trying an unsigned int* instead gives a compiler warning...
> The long type on x64 Windows is 32 bit, on x64 Linux (and most other
> platforms) it is 64 bit.
> To deal with that difference, Wine defines LONG to be int (and ULONG
> to be unsigned int etc), which is 32 bit on all the relevant platforms.
> So yes, substituting PULONG for unsigned long * is wrong, it needs to
> be ULONG *, DWORD *, or similar. The compiler warning that you get from
> the correct prototype would be because you're also using a (lowercase)
> long when calling the function -- this also needs to be an uppercase

Okay, thanks for making that clear. I tried to look up this stuff myself
but apparently didn't succeed...

>> Including dbghelp.h along with imagehlp.h unfortunately gives a host of
>> definition collisions. From MSDN I know that some of dbghelp's functions
>> are mirrored in imagehlp, but apparently something's wrong here in Wine...
> If this works in PSDK, then a fix for Wine's headers is probably
> preferable -- but I have no idea how intrusive that would be, so a
> workaround like this could be appropriate for the time being.

Okay, leaving as is.

>>> Most functions I know simply do ((PCSTR)(DWORD_PTR)ordinal) to represent
>>> ordinals (e.g. GetProcAddress). That's just a guess though, I know
>>> nothing about this function.
>> I don't know that much either about this stuff -- documentation is
>> rather scarce. So the only way to find out is more tests, isn't it?
> That sounds right ;)  (although a step-by-step approach should be
> okay, so I don't think you have to implement this right away)

Okay, also leaving as is for now.

Thanks for your review! I've just posted an updated version [1]
including the proper ULONGs of my patch in reply to Andrew Eikum's message.



More information about the wine-devel mailing list