Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.04 KB

File metadata and controls

47 lines (32 loc) · 1.04 KB

Home

Function name : CharToOem

Group: String - Library: user32


Translates a string into the OEM-defined character set.


Code examples:

Converting strings between ANSI and OEM

Declaration:

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

FoxPro declaration:

DECLARE SHORT CharToOem IN user32;
	STRING lpszSrc,;
	STRING @ lpszDst  

Parameters:

lpszSrc [in] Pointer to the null-terminated string to translate.

lpszDst [out] Pointer to the buffer for the translated string.


Return value:

The return value is always nonzero except when you pass the same address to lpszSrc and lpszDst in the wide-character version of the function. In this case the function returns zero and GetLastError returns ERROR_INVALID_ADDRESS.