SHUnicodeToAnsiCP(3w)

SHUnicodeToAnsiCP3w

Usage

DWORD SHUnicodeToAnsiCP
(
UINT CodePage,
LPCWSTR lpSrcStr,
LPSTR lpDstStr,
int dstlen
)

Overview

Convert a Unicode string to Ascii.

Params

CodePage [In] Code page to use for the conversion.

lpSrcStr [In] Source Unicode string to convert.

lpDstStr [Out] Destination for converted Ascii string.

dstlen [In] Length of buffer at lpDstStr.

Returns

Success: The length in bytes of the result at lpDstStr (including the terminator)

Failure: When using CP_UTF8, CP_UTF7 or 0xc350 as codePage, 0 is returned and the result is not nul-terminated. When using a different codepage, the length in bytes of the truncated result at lpDstStr (including the terminator) is returned and lpDstStr is always nul-terminated.

Implementation

Exported by ordinal only. Use GetProcAddress(3w) to obtain a pointer to the function.

Implemented in "dlls/shlwapi/string.c".

Debug channel "shell".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.