On Tue Jun 17 17:26:41 2025 +0000, Yuxuan Shui wrote:
In `test_aw_conversion_dlgproc` we set DLGPROC to `test_aw_conversion_dlgprocA`, then we set "test_mode" to `DLGPROCTEXT_DLGPROCA`, and call `DefDlgProcA(hdlg, WM_SETTEXT, 0, (LPARAM)testtext)`. So `testtext` gets passed as-is to `test_aw_conversion_dlgprocA`, which then passes it directly to `DefWindowProcW`. Since `DefWindowProcW` wants a wide string, it goes out-of-bound trying to `lstrlenW` it.
I see, in this case it's enough to use "WndText\0". Also please add a code comment why this constant has to be that way, simply stating that it's passed to the ProcW function.