Calling GetConsoleCP() when ReadConsoleW() fails (potentially indicating
that cmd.exe's instance isn't attached to a console) makes no sense.
In details, since GetConsoleCP() returns 0 when not attached to a console
to indicate error, we're in fact using CP_ACP.
So fallback explicitely to OEM CP (which is the default for CUI programs).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
In ept_map, rpcss uses TowerConstruct to allocate tower array elements.
The array is later released by the generated stub code, and each element
is ultimately freed using MIDL_user_free.
TowerConstruct always allocate memory using I_RpcAllocate, we must use
I_RpcFree to free it.
Some applications use FindWindowA() with class Shell_TrayWnd to find the taskbar window on Windows.
Then GetWindowRect() is called to get the taskbar window rectangle. Finally, the taskbar window
rectangle is subtracted from the primary screen rectangle to calculate the work area. Without a
valid taskbar window position, these applications end up getting an incorrect work area and going
down the wrong path. So use the same position and size as the host system panel for explorer taskbar
when it's hidden.
GCC 12.2 rightfully complains about an out-of-founds array access.
This can possibly happen for unsupported variable names.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This allows:
- to mimic native behavior when a stray '\0' is present in file
(in 'FOR /F' execution, it's interpreted as an EOF marker)
(prevents an infinite loop)
- supports (with /USEBACKQ) unicode output (if BOM is present)
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53386
After applying a theme with CaptionBarHeight set, caption height from SPI_GETNONCLIENTMETRICS is set
to the specified size. However in refresh_sysparams(), the caption height is refreshed and the value
from SM_CXSIZE is used and ends up overwriting the theme specified caption height. SM_CYSIZE is the
correct index instead of SM_CXSIZE.
You may need to turn a theme off and on for the correct caption height to take effect after the fix.
Correctly handling keyboards (French, German...) which report right-alt
as ctrl+alt in VkKeyScan().
Splitting escape_test input tests into pure virtual keys on one hand,
and modified char key on the other.
Generating the virtual codes for the later instead of hardcoding the
results (bound to generic US keyboard).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52980
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Some keyboards (French, German and some others) report the right alt key
(which is some cases the right-shift one) as ctrl+alt.
Add proper handling for ctrl+alt return from VkKeyScan().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52980
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
The caller already analyses get_subtests() errors and provides
a detailed error message in the information section of the report
so the report(R_ERROR) pop up / stderr message is redundant.
It should fix the errors around line 1370 in conhost/tests/tty.c, but
it doesn't fix other errors around line 1530 and 1550 which are
completly unrelated to this change. So failures to be expected on the
latter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52648
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Prints 'int a[10]' (instead of 'int[10] a').
Ditto for variables/fields of type function pointer.
And for pure type printing, no longer prints --none-- for
arrays and function pointers.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This ensures that we always have a type as pointer to a known <type>
(either because it exists in <type>'s module, or it's synthetized inside
debugger).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>