riched20: Remove the unneeded DEFINE_STDCALL_WRAPPER.
Michael Stefaniuc
mstefani at redhat.com
Thu Apr 7 11:17:53 CDT 2011
Dylan Smith wrote:
> On Thu, Apr 7, 2011 at 5:30 AM, Michael Stefaniuc <mstefani at redhat.de>wrote:
>
>> The COM methods are already __stdcall.
>> ---
>> dlls/riched20/txthost.c | 128
>> ++++++++++++++--------------------------------
>> 1 files changed, 39 insertions(+), 89 deletions(-)
>>
>> COM methods are supposed to use the stdcall calling convention, but the
> native riched20 and the native headers just defines ITextHost and
> ITextServices to be a c++ class (i.e. using the thiscall calling
> convention). Just look at the native TextServ.h header.
Right, but for that you have the textHostVtbl with the THISCALL() wrapper.
The itextHostStdcallVtbl is just for the C COM macros used from Wine
code as calling a thiscall function from Wine is a PITA. That is handled
in editor.h:
#ifdef __i386__ /* Use wrappers to perform thiscall on i386 */
#define TXTHOST_VTABLE(This) (&itextHostStdcallVtbl)
#else /* __i386__ */
#define TXTHOST_VTABLE(This) (This)->lpVtbl
#endif /* __i386__ */
/*** ITextHost methods ***/
#define ITextHost_TxGetDC(This) TXTHOST_VTABLE(This)->TxGetDC(This)
#define ITextHost_TxReleaseDC(This,a)
TXTHOST_VTABLE(This)->TxReleaseDC(This,a)
...
On i386 Wine is calling functions from the static itextHostStdcallVtbl
and those functions are not thiscall. Of course I might miss something
as that code is mind warping...
bye
michael
More information about the wine-devel
mailing list