Hello all.

First of all I should say, that I eventually managed to force PageMaker
to load publication and draw all of it on the screen even without ugly
hacks with kernel32.spec. Victory, did you say? Not really.

Browsing the disassembled (!) KERNEL32.ASM and PM65.ASM I noticed, that
PM pushes some arguments on the stack before call to QT_Thunk and then
doesn't pop them, i.e. PM assumes, that it is QT_Thunk's job.
Okay. I did add the following strings to wine/dlls/kernel/thunk.c:

    TRACE("Bumping ESP by %ld bytes\n", argsize);
    ESP_reg(context) += argsize;

at the end of QT_Thunk.

But argsize is always 12 for me, in spite of the fact, that QT_Thunk
calls KERNEL.47: GETMODULEHANDLE(03af:0000 "ATM").

I'm absolutely sure, that PM doesn't use QT_Thunk except for GetModuleHandle16
and I replaced "ESP_reg(context) += argsize" by "ESP_reg(context) += 4": PM works!

So, the question: what the right way of popping right number of bytes from the
stack after CallTo16?

Dmitry.


Reply via email to