> + if (ret == 0) {
> + /* Older Windows versons do not support MB_ERR_INVALID_CHARS.
> + * WinNT 3.x signals ERROR_INVALID_PARAMETER and WinNT 4.0 signals
> ERROR_INVALID_FLAGS.
> + * Fallback case when MB_ERR_INVALID_CHARS is not supported.
> + */
> + DWORD error = GetLastError ();
> + if (error == ERROR_INVALID_PARAMETER || error == ERROR_INVALID_FLAGS)
> + ret = MultiByteToWideChar (cp, 0, conversion_state.bytes, length,
> &wcOut, 1);
> + }
I am surprised MB_ERR_INVALID_CHARS is not supported on NT 4; I thought it
would be mentioned in Windows SDK documentation (from Windows XP SDK).
Regardless, useful information to know.
- Kirill Makurin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public