MSVCRT calling convention issue

us at the-edmeades.demon.co.uk us at the-edmeades.demon.co.uk
Mon May 5 07:10:01 CDT 2003


While debugging a game which only installs if we use the windows msvcrt, I have identified the problem but dont know how to fix it!

The problem revolves around the function MSVCRT_type_info_raw_name. This is
defined as stdcall, but disassembling the windows version, it clearly shows
use of a calling convention I had never heard of, 'thiscall'. According to
the MSDN, thiscall is stdcall BUT the 'this' pointer on x86 machines is stored
in the ECX register.

How can we fix this?

My thought: Change the definition to not take a ptr arg, and define a local,
this as being in the ECX register, but (a) I dont know how to do this, and
(b) is not a solution for winelib applications.

For now I can continue having put the msvcrt.dll from another machine in, but
it would be nice to solve this issue. I'd also guess it affects more than just
that one function.

Regards,
Jason




More information about the wine-devel mailing list