On Thu Mar 9 15:46:52 2023 +0000, Byeongsik Jeon wrote:
In my opinion, some more little code is needed here. In the Unicode IME, ImeEnumRegisterWord() passes a Unicode string as a parameter to the callback function. For this reason, instead of passing procA directly to ImeEnumRegisterWord(), you need to pass a wrapping callback function that changes the string encoding(W to A). The wrapping callback function must know the address of procA. My suggestion is to pass the address of the structure that stores procA and 'user' instead of 'user' as a parameter to ImeEnumRegisterWord(). The wrapping callback function can get them back as the last parameter.
This is only reordering the control flow and cleaning up the code, it should have no effect on the logic.
Yes, the functions are not working correctly, and I intend to fix them, but that would come in a later changes, and there's quite a bit of refactoring to make first.