wine/programs
Eric Pouech f2ca35bd80 cmd: Use OEM code page when reading a file.
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>
2022-11-25 18:09:57 +01:00
..
arp makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
aspnet_regiis makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
attrib attrib: Use OEM code page for output. 2022-05-02 11:47:14 +02:00
cabarc cabarc: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
cacls makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
certutil certutil: Add stub program. 2022-11-07 21:16:10 +01:00
chcp.com chcp: Use OEM code page for output. 2022-05-02 11:47:17 +02:00
clock makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
cmd cmd: Use OEM code page when reading a file. 2022-11-25 18:09:57 +01:00
conhost conhost/tests: Fix some conditions on tty test termination. 2022-11-01 20:46:23 +01:00
control makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
cscript [cw]script: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
dism makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
dllhost dllhost: Try to load the dll server's factory at the start. 2022-05-06 12:07:07 +02:00
dplaysvr makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
dpnsvr makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
dpvsetup makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
dxdiag dxdiag: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
eject eject: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
expand expand: Use the standard va_list instead of __ms_va_list. 2021-10-25 11:00:40 +02:00
explorer explorer: Put the calling convention inside the function pointer parentheses. 2022-11-22 18:27:30 +01:00
extrac32 makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
fc makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
find find/tests: Enable compilation with long types. 2022-02-03 17:19:41 +01:00
findstr makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
fsutil fsutil: Use OEM code page for output. 2022-05-02 11:47:19 +02:00
hh makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
hostname hostname: Use OEM code page for output. 2022-05-02 11:47:21 +02:00
icacls makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
icinfo icinfo: Use OEM code page for output. 2022-05-02 11:47:24 +02:00
iexplore makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
ipconfig ipconfig: Use OEM code page for output. 2022-05-02 11:47:26 +02:00
lodctr makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
mofcomp makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
mshta makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
msidb msidb: Use CRT allocation functions. 2022-09-09 23:21:40 +02:00
msiexec msiexec: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
msinfo32 makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
net net: Use OEM code page for output. 2022-05-02 11:47:28 +02:00
netsh makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
netstat netstat: Use OEM code page for output. 2022-05-02 11:47:30 +02:00
ngen ngen: Add version resource. 2022-10-11 18:40:37 +02:00
notepad notepad: Show goto dialog box. 2022-09-23 15:16:48 +02:00
oleview makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
ping ping: Use CRT allocation functions. 2022-09-09 23:21:40 +02:00
plugplay plugplay: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
powershell makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
presentationfontcache presentationfontcache: Enable compilation with long types. 2022-02-04 11:20:33 +01:00
progman progman: Use correct integral type. 2022-01-26 21:53:55 +01:00
reg reg: Add REG_QWORD support to 'add'. 2022-06-27 22:58:21 +02:00
regasm makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
regedit regedit: Add a direct import for shcore. 2022-09-30 18:34:22 +02:00
regini makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
regsvcs makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
regsvr32 regsvr32: Use OEM code page for output. 2022-05-02 11:47:34 +02:00
robocopy robocopy: Add stub. 2021-10-18 21:26:10 +02:00
rpcss rpcss: Use I_Rpc(Free|Allocate) in MIDL_user_(allocate|free). 2022-11-23 17:59:47 +01:00
rundll.exe16 makefiles: Always build 16-bit modules with msvcrt. 2020-04-02 11:09:19 +02:00
rundll32 rundll32: Activate context at ID 123 before calling library functions. 2022-04-13 18:15:48 +02:00
sc sc: Allow using separate arguments for parameter name and value. 2022-05-03 20:39:14 +02:00
schtasks schtasks: Enable compilation with long types. 2022-02-09 18:37:32 +01:00
sdbinst makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
secedit makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
servicemodelreg makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
services services: Start services detached from console. 2022-03-17 21:06:10 +01:00
setx setx: Add stub program. 2022-11-07 21:16:10 +01:00
shutdown makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
spoolsv spoolsv: Enable compilation with long types. 2022-02-07 10:59:15 +01:00
start start: Use OEM code page for output. 2022-05-02 11:47:36 +02:00
subst makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
svchost svchost: Enable compilation with long types. 2022-02-07 10:59:24 +01:00
systeminfo makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
taskkill taskkill: Use OEM code page for output. 2022-05-02 11:47:37 +02:00
tasklist makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
taskmgr taskmgr: Fix the unit in memory usage graph on performance tab. 2022-05-23 10:27:54 +02:00
termsv termsv: Enable compilation with long types. 2022-02-07 10:59:27 +01:00
uninstaller uninstaller: Use OEM code page for output. 2022-05-02 11:47:39 +02:00
unlodctr makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
view makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
wevtutil makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
where makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
whoami whoami: Use OEM code page for output. 2022-05-02 11:47:40 +02:00
wineboot wineboot: Don't use ai_canonname for ComputerName if it is "localhost". 2022-04-27 21:47:43 +02:00
winebrowser winebrowser: Enable compilation with long types. 2022-02-07 10:59:41 +01:00
winecfg uuid: Add propkey.h. 2022-11-08 20:07:51 +01:00
wineconsole wineconsole: Enable compilation with long types. 2022-02-07 10:59:48 +01:00
winedbg winedbg: Don't use invalid address mode in exception prolog. 2022-11-14 13:13:02 +01:00
winedevice winedevice: Enable compilation with long types. 2022-02-07 10:59:56 +01:00
winefile winefile: Use 10 DLUs for check box height. 2022-07-15 11:32:54 +02:00
winemenubuilder winemenubuilder: Use the full path name when extracting an icon. 2022-03-31 18:51:32 +02:00
winemine makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
winemsibuilder winemsibuilder: Use CRT allocation functions. 2022-07-05 12:34:03 +02:00
winepath winepath: Free wine_get_(dos|unix)_file_name memory with HeapFree. 2022-11-25 18:09:57 +01:00
winetest winetest: Let the get_subtests() caller report errors. 2022-10-20 18:29:59 +02:00
winevdm Revert "winevdm: Enable visual styles.". 2021-10-18 10:47:56 +02:00
winhelp.exe16 makefiles: Always build 16-bit modules with msvcrt. 2020-04-02 11:09:19 +02:00
winhlp32 winhlp32: Enable compilation with long types. 2022-02-07 11:00:09 +01:00
winmgmt winmgmt: Enable compilation with long types. 2022-02-07 11:00:13 +01:00
winoldap.mod16 winoldap.mod16: Enable compilation with long types. 2022-02-07 11:00:16 +01:00
winver makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
wmic wmic: Support array of BSTRs in convert_to_bstr(). 2022-11-24 22:20:20 +01:00
wmplayer makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
wordpad wordpad: Use CRT allocation functions. 2022-07-05 12:34:03 +02:00
write makefiles: Make -mno-cygwin the default. 2021-09-20 22:45:48 +02:00
wscript wscript: Use CRT memory allocation functions. 2022-07-05 12:34:03 +02:00
wuauserv wuauserv: Enable compilation with long types. 2022-02-07 11:00:24 +01:00
wusa wusa: Remove string duplication helper. 2022-04-20 22:57:51 +02:00
xcopy xcopy: Use OEM code page for output. 2022-05-02 11:47:43 +02:00