OemToCharBuff

The OemToCharBuff function translates a specified number of characters in a string from the OEM-defined character set into either an ANSI or a wide-character string. (OEM stands for original equipment manufacturer.)

BOOL OemToCharBuff(
  LPCSTR lpszSrc,      // pointer to string to translate
  LPTSTR lpszDst,      // pointer to buffer for translated string
  DWORD cchDstLength   // size of buffer
);
 

Parameters

lpszSrc
Pointer to a buffer containing one or more characters from the OEM-defined character set.
lpszDst
Pointer to the buffer for the translated string. If the OemToCharBuff function is being used as an ANSI function, the string can be translated in place by setting the lpszDst parameter to the same address as the lpszSrc parameter. This cannot be done if the OemToCharBuff function is being used as a wide-character function.
cchDstLength
Specifies the number of characters to translate in the buffer identified by the lpszSrc parameter.

Return Values

The return value is always nonzero.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winuser.h.
  Import Library: Use user32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

String Manipulation Overview, String Manipulation Functions, CharToOem, CharToOemBuff, OemToChar