It's quite possible that the device name is entirely composed of ASCII characters but, as far as the API is concerned, it's still an ANSI string.
Signed-off-by: Francois Gouget fgouget@free.fr --- The name of RtlCreateUnicodeStringFromAsciiz() is actually pretty misleading since all it does is manipulate ANSI strings (at least as far as the Wine implementation is concerned):
RtlInitAnsiString( &ansi, src ); // no charset conversion here! return !RtlAnsiStringToUnicodeString( target, &ansi, TRUE ); --- dlls/kernel32/comm.c | 12 ++++++------ dlls/kernel32/lcformat.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/kernel32/comm.c b/dlls/kernel32/comm.c index e9dd0feac58..e6d1c06b11e 100644 --- a/dlls/kernel32/comm.c +++ b/dlls/kernel32/comm.c @@ -398,7 +398,7 @@ static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lpt * BuildCommDCBA (KERNEL32.@) * * Updates a device control block data structure with values from an - * ascii device control string. The device control string has two forms + * ANSI device control string. The device control string has two forms * normal and extended, it must be exclusively in one or the other form. * * RETURNS @@ -406,7 +406,7 @@ static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lpt * True on success, false on a malformed control string. */ BOOL WINAPI BuildCommDCBA( - LPCSTR device, /* [in] The ascii device control string used to update the DCB. */ + LPCSTR device, /* [in] The ANSI device control string used to update the DCB. */ LPDCB lpdcb) /* [out] The device control block to be updated. */ { return BuildCommDCBAndTimeoutsA(device,lpdcb,NULL); @@ -416,7 +416,7 @@ BOOL WINAPI BuildCommDCBA( * BuildCommDCBAndTimeoutsA (KERNEL32.@) * * Updates a device control block data structure with values from an - * ascii device control string. Taking timeout values from a timeouts + * ANSI device control string. Taking timeout values from a timeouts * struct if desired by the control string. * * RETURNS @@ -424,7 +424,7 @@ BOOL WINAPI BuildCommDCBA( * True on success, false bad handles etc. */ BOOL WINAPI BuildCommDCBAndTimeoutsA( - LPCSTR device, /* [in] The ascii device control string. */ + LPCSTR device, /* [in] The ANSI device control string. */ LPDCB lpdcb, /* [out] The device control block to be updated. */ LPCOMMTIMEOUTS lptimeouts) /* [in] The COMMTIMEOUTS structure to be updated. */ { @@ -705,7 +705,7 @@ BOOL WINAPI GetDefaultCommConfigW( /************************************************************************** * GetDefaultCommConfigA (KERNEL32.@) * - * Acquires the default configuration of the specified communication device. (ascii) + * Acquires the default configuration of the specified communication device. * * RETURNS * @@ -713,7 +713,7 @@ BOOL WINAPI GetDefaultCommConfigW( * if the device is not found or the buffer is too small. */ BOOL WINAPI GetDefaultCommConfigA( - LPCSTR lpszName, /* [in] The ascii name of the device targeted for configuration. */ + LPCSTR lpszName, /* [in] The ANSI name of the device targeted for configuration. */ LPCOMMCONFIG lpCC, /* [out] The default configuration for the device. */ LPDWORD lpdwSize) /* [in/out] Initially the size of the default configuration buffer, afterwards the number of bytes copied to the buffer or diff --git a/dlls/kernel32/lcformat.c b/dlls/kernel32/lcformat.c index 5711d05b76f..22a9efb24c7 100644 --- a/dlls/kernel32/lcformat.c +++ b/dlls/kernel32/lcformat.c @@ -315,7 +315,7 @@ static const NLS_FORMAT_NODE *NLS_GetFormats(LCID lcid, DWORD dwFlags) /************************************************************************** * NLS_IsUnicodeOnlyLcid <internal> * - * Determine if a locale is Unicode only, and thus invalid in ASCII calls. + * Determine if a locale is Unicode only, and thus invalid in ANSI calls. */ static BOOL NLS_IsUnicodeOnlyLcid(LCID lcid) { @@ -816,7 +816,7 @@ static INT NLS_GetDateTimeFormatA(LCID lcid, DWORD dwFlags, *| gg Era string, for example 'AD'. * - To output any literal character that could be misidentified as a token, * enclose it in single quotes. - * - The Ascii version of this function fails if lcid is Unicode only. + * - The ANSI version of this function fails if lcid is Unicode only. * * RETURNS * Success: The number of character written to lpDateStr, or that would @@ -922,7 +922,7 @@ INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, *| tt Long time marker (e.g. "AM", "PM") * - To output any literal character that could be misidentified as a token, * enclose it in single quotes. - * - The Ascii version of this function fails if lcid is Unicode only. + * - The ANSI version of this function fails if lcid is Unicode only. * * RETURNS * Success: The number of character written to lpTimeStr, or that would @@ -1006,7 +1006,7 @@ INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, * - This function rounds the number string if the number of decimals exceeds the * locales normal number of decimal places. * - If cchOut is 0, this function does not write to lpNumberStr. - * - The Ascii version of this function fails if lcid is Unicode only. + * - The ANSI version of this function fails if lcid is Unicode only. * * RETURNS * Success: The number of character written to lpNumberStr, or that would @@ -1370,7 +1370,7 @@ INT WINAPI GetNumberFormatEx(LPCWSTR name, DWORD flags, * - This function rounds the currency if the number of decimals exceeds the * locales number of currency decimal places. * - If cchOut is 0, this function does not write to lpCurrencyStr. - * - The Ascii version of this function fails if lcid is Unicode only. + * - The ANSI version of this function fails if lcid is Unicode only. * * RETURNS * Success: The number of character written to lpNumberStr, or that would