--- np2/wince/oemtext.h 2004/06/21 02:01:33 1.1 +++ np2/wince/oemtext.h 2005/02/12 12:14:00 1.2 @@ -3,13 +3,13 @@ extern "C" { #endif -#if defined(OSLANG_UTF8) -UINT oemtext_sjis2oem(OEMCHAR *dst, UINT dcnt, const char *src, UINT scnt); -UINT oemtext_oem2sjis(char *dst, UINT dcnt, const OEMCHAR *src, UINT scnt); -#elif defined(OSLANG_UCS2) -#define oemtext_sjis2oem(dst, dcnt, src, scnt) \ +#if defined(UNICODE) && defined(OSLANG_UTF8) +UINT oemtext_sjistooem(OEMCHAR *dst, UINT dcnt, const char *src, UINT scnt); +UINT oemtext_oemtosjis(char *dst, UINT dcnt, const OEMCHAR *src, UINT scnt); +#elif defined(UNICODE) && defined(OSLANG_UCS2) +#define oemtext_sjistooem(dst, dcnt, src, scnt) \ MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, -1, dst, dcnt) -#define oemtext_oem2sjis(dst, dcnt, src, scnt) \ +#define oemtext_oemtosjis(dst, dcnt, src, scnt) \ WideCharToMultiByte(CP_ACP, 0, src, -1, dst, dcnt, NULL, NULL) #endif