unicows update and PE memory format

Alexandre Julliard julliard at winehq.org
Mon Nov 24 16:24:20 CST 2003


Shachar Shemesh <wine-devel at shemesh.biz> writes:

> Some tracing leads me to suspect (I have not done enough research to
> determine yet) that it accesses the PE header of kernel32 directly. It
> appears that unicows.dll enountered the exact same problem we have vis
> a vis GetProcAddress, and have happily hacked their way around it
> using direct memory access. What I see them do is call
> "GetModuleHandle" on "kernel32.dll", and then use the resulting handle
> as a struct/array pointer, and access offsets into it. At point I am
> lost. I don't know what GetModuleHandle returns on Windows, and I
> don't know whether we return anything that is, in any way, meaningful
> outside it's use as a pure handle.

Most likely it's doing GetProcAddress manually. GetModuleHandle
returns the address of the module in memory, from there you can look
up exports etc. but this should work with builtins too. Could you
please mail me a .exe showing the problem?

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list