[WINSPOOL] Convert the returned Unicode string back to ANSI in GetDefaultPrinterA.

Thanks to Mark for the hint in CORE-14072!
This commit is contained in:
Colin Finck 2017-12-09 10:59:40 +01:00
parent de793ea5d6
commit 45b9b5c1ef

View file

@ -449,6 +449,9 @@ GetDefaultPrinterA(LPSTR pszBuffer, LPDWORD pcchBuffer)
goto Cleanup;
}
// We successfully got a string in pwszBuffer, so convert the Unicode string to ANSI.
WideCharToMultiByte(CP_ACP, 0, pwszBuffer, -1, pszBuffer, *pcchBuffer, NULL, NULL);
dwErrorCode = ERROR_SUCCESS;
Cleanup: