Closed emako closed 9 months ago
Would you mind testing the following?
[DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Unicode)]
public static extern string? MB_GetString(uint wBtn);
You can leave off the '?' after 'string' if you are not using nullability settings.
I have this resolved and need to update the master branch. For the return value, it should use StrPtrUni
instead of string?
. The value returned is a pointer into system memory. I'll close one I commit the fix.
Describe the bug and how to reproduce
BUG code:
My solution code:
What code is involved
User32.MB_GetString
Expected behavior
MB_GetString make exe crashed and ExitCode is 3221226356 (0xc0000374)
Screenshots
程序“[4784] XXX.exe”已退出,返回值为 3221226356 (0xc0000374)。
Translated to English:
The program '[4784] XXX. exe' has exited with a return value of 3221226356 (0xc0000374).