Hello,
This is a follow up of http://www.winehq.org/pipermail/wine-devel/2013-July/100459.html ( [PATCH] imm32: Fixed crashing in ImmGetIMCCSize. )
I believe the attached patchset is the correct fix for the Office crashing bug, how ever, I'm looking for a more graceful way to improve ImmCreateContext and other IMC functions, I appreciate to any feedback on the patches especially Patch 6/6.
My tests show that Windows return a HGLOBAL hmem for ImmCreateIMCC() as the returned HIMCC, so it is easy to re-implement ImmCreateIMCC in a graceful way. However, Windows return a magic number for ImmCreateContext, (for instance, have a look at 000B01D9 in the test show in https://testbot.winehq.org/JobDetails.pl?Key=26619&log_207=1#k207)
I have no idea how that magic number comes, while I understand there is no need to re-implement ImmCreateContext in the same way as Windows does, I'm still interesting in a more beautiful implementation like my ImmCreateIMCC reached, get rid of casting InputContextData to HIMC if possible. Thanks in advance for any suggestions!
If there is no better way, I'll send this series to wine-patches.