[1/2] richedit: Created initial tests for windowless richedit controls.

Dylan Smith dylan.ah.smith at gmail.com
Thu Oct 30 10:03:29 CDT 2008

(Patches sent by Maarten Lankhorst and Austin Lund were modified to
create this patch)

The initial tests added simply call CreateTextServices, and query for
the ITextServices interface, then cleans up.

Since CreateTextServices needs an implementation of ITextHost to be
given, this patch needed a stub implementation.  This required wrappers
for converting thiscall to stdcall, which is why the macros borrowed
from port.h and config.h are used.  All of this is why the patch got
quicky bloated.

The code borrowed from config.h for the __ASM_FUNC and __ASM_NAME macros
was only tested with gcc and mingw, so I am not sure if it works with
other platforms. Since config.h is autogenerated from configure, I was
not able to borrow proper conditional macros, and both config.h and
port.h aren't supposed to be included in tests according to
errors in wine/test.h.

In order to investigate what is happening in the tests, it is helpful
to trace the calls to ITextHost methods by the richedit controls.  I
realized it would be too verbose to trace all these calls by default,
so I wrapped them all with a check for winedebug > 1, since normally
winedebug is 0 or 1.
 dlls/riched20/tests/Makefile.in |    3 +-
 dlls/riched20/tests/txtsrv.c    |  665 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 667 insertions(+), 1 deletions(-)
 create mode 100644 dlls/riched20/tests/txtsrv.c
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Created-initial-tests-for-windowless-ri.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20081030/83ed1212/attachment-0001.txt 

More information about the wine-patches mailing list