OemToCharBuff

  BOOL OemToCharBuff(lpszOemStr, lpszStr, cchString)    
  LPCTSTR lpszOemStr; /* address of string to translate */
  LPTSTR lpszStr; /* address of buffer for translated string */
  DWORD cchString; /* size of buffer in characters */

The OemToCharBuff function translates the string in the buffer pointed to by the lpszOemStr parameter from the OEM-defined character set.

Parameters

lpszOemStr

Points to a buffer containing one or more characters from the OEM-defined character set.

lpszStr

Points to the location where the translated string is to be copied. If the string buffer is large enough, and the OemToCharBuff function is being used as an ANSI function, the lpszStr parameter can be the same as lpszOemStr to translate the string in place. This cannot be done if the OemToCharBuff function is being used as a wide-character function. lpszStr and lpszOemStr cannot overlap if the function is being used as a wide-character function.

cchString

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

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

Comments

The OemToCharBuff 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).

See Also

OemToChar