[PATCH 1/2] fsutil: make usage and unsupported command messages localizable
Arkadiusz Hiler
ahiler at codeweavers.com
Tue Aug 4 07:04:37 CDT 2020
On Thu, Apr 30, 2020 at 02:49:07PM -0500, Zebediah Figura wrote:
> > + LoadStringW(GetModuleHandleW(NULL), msg, fmt, sizeof(fmt)/sizeof(fmt[0]));
>
> ARRAY_SIZE(fmt)
>
> Also, I know that this is copied from elsewhere, but I imagine we could
> simplify this code by using FORMAT_MESSAGE_FROM_HMODULE.
This indeed looks line a neat improvement - we could get rid of
output_vsprintf() completetly with something like:
FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE, NULL, msg, 0, out, ARRAY_SIZE(out), &arguments);
There is small difference in behavior though - LoadStringW() uses
STRINGTABLE from .rc whereas FormatMessageW(FORMAT_MESSAGE_FROM_HMODULE)
uses MESSAGETABLE from .mc file.
This would create a precedent among programs. Do you think it's okay to
go this way?
> > + WINE_TRACE(" %s", wine_dbgstr_w(argv[i]));
> > + WINE_TRACE("\n");
>
> I think, though I'm not sure, that TRACE and debugstr_w() are fine in
> programs nowadays.
A lot of programs are using this, so I assume it's fine. At least
nothing blows up on my end.
--
Cheers,
Arek
More information about the wine-devel
mailing list