imagehlp: Implement (parts of) BindImageEx

Bernhard Reiter ockham at
Tue Aug 12 12:34:28 CDT 2014

Am 2014-08-12 um 18:13 schrieb Thomas Faber:
> On 2014-08-12 17:34, Bernhard Reiter wrote:
>> +void * WINAPI ImageDirectoryEntryToDataEx( void *base, BOOL image, unsigned short dir,
>> +                                           unsigned long *size, PIMAGE_SECTION_HEADER *section );
> BOOLEAN is not BOOL (neither on Windows nor on Wine).
> LONG is not long (on Wine).

But I've substituted a PULONG here for an unsigned long * -- is that
wrong? Trying an unsigned int* instead gives a compiler warning...

> (Including dbghelp.h would complain about this. Not sure why you're not
>  doing that, but I haven't looked in detail)

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(thunk->u1.Ordinal & IMAGE_ORDINAL_FLAG)
>> +      {
>> +        /* Ordinal, i.e. unnamed function. Not sure if/how to pass this on to StatusRoutine... */
>> +        /* DWORD ordinal = (DWORD) (thunk->u1.Ordinal & (~IMAGE_ORDINAL_FLAG)); */
>> +      }
> 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?

> Best,
> Thomas

Thx for your comments!

More information about the wine-devel mailing list