CharToOemBuff

  BOOL CharToOemBuff(lpszSrc, lpszDest, cchSrc)    
  LPCTSTR lpszSrc; /* address of string to convert */
  LPTSTR lpszDest; /* address of converted string */
  DWORD cchSrc; /* length of string to convert in characters */

The CharToOemBuff function translates a string into the OEM-defined character set.

Parameters

lpszSrc

Points to the null-terminated string to convert.

lpszDest

Points to the buffer for the translated string. This parameter can be the same as lpszSrc to translate the string in place if the buffer is large enough.

cchSrc

Specifies the number of characters in the buffer identified by the lpszSrc parameter.

Return Value

If the function is successful, the return value is TRUE. Otherwise, the return value is FALSE. This may mean that the parameters were invalid or there was not enough room in the destination buffer.

Comments

The CharToOemBuff function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).

See Also

CharToOem, OemToCharBuff, OemToChar