"Dmitry Timoshkov" <[EMAIL PROTECTED]> writes:
> I already had burned my fingers with the Wine's "register" calling convention
> in the spec-files. Function, declared as "register" in a spec-file, can do
> at return any thing, what it wants: i.e. removing or adding WINAPI, cdecl etc.
> in the c-file doesn't change anything, no crashes at all. Is it by design?
Yes; register functions restore the full context on return, so
anything the called function does with the stack is
irrelevant. cdecl/stdcall has to be implemented by fixing the stack
pointer in the context before returning.
> Patrik Stridvall <[EMAIL PROTECTED]> wrote:
> >I think you ask the wrong question. It don't think it is anything
> >to do with CallTo16 in itself. The problem might be that the
> >argsize is wrongly calculated.
> >
> >It is possible that the way argsize is calculated by subtracting
> >0x40 only worked for the specific application that was tested.
In fact even if the right value is larger, subtracting 0x40 should
still work for all apps, we will simply be transferring too many
arguments to the 16-bit stack. So the fact that it works with 0x40
does not necessarily prove it is the correct value; but I don't claim
to understand this thunking stuff...
--
Alexandre Julliard
[EMAIL PROTECTED]