CharToOem

The CharToOem function translates a string into the OEM-defined character set. (OEM stands for original equipment manufacturer.)

BOOL CharToOem(
  LPCTSTR lpszSrc,  // pointer to string to translate
  LPSTR lpszDst     // pointer to translated string
);
 

Parameters

lpszSrc
Pointer to the null-terminated string to translate.
lpszDst
Pointer to the buffer for the translated string. If the CharToOem 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 CharToOem is being used as a wide-character function.

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, CharToOemBuff, OemToChar, OemToCharBuff