다음을 통해 공유


OemToCharA 함수(winuser.h)

OEM 정의 문자 집합의 문자열을 ANSI 또는 와이드 문자열로 변환합니다.

Warning Do not use. 보안 고려 사항을 참조하세요.
 

Syntax

BOOL OemToCharA(
  [in]  LPCSTR pSrc,
  [out] LPSTR  pDst
);

Parameters

[in] pSrc

Type: LPCSTR

OEM 정의 문자 집합의 null로 끝나는 문자 문자열입니다.

[out] pDst

Type: LPTSTR

번역된 문자열을 받는 대상 버퍼입니다. If the OemToChar 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 OemToChar is being used as a wide-character function.

Return value

Type: BOOL

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.

Remarks

Security Considerations

이 함수를 잘못 사용하면 프로그램의 보안이 손상될 수 있습니다. For example, miscalculating the proper size of the lpszDst buffer, especially when the application is used in both ANSI and Unicode versions, can cause a buffer overflow. 자세한 내용은 보안 고려 사항: 국가별 기능보안 고려 사항: Windows 사용자 인터페이스를 참조하세요.

Note

winuser.h 헤더는 OemToChar를 UNICODE 전처리기 상수의 정의에 따라 이 함수의 ANSI 또는 유니코드 버전을 자동으로 선택하는 별칭으로 정의합니다. 인코딩 중립 별칭을 인코딩 중립이 아닌 코드와 혼합하면 컴파일 또는 런타임 오류가 발생하는 불일치가 발생할 수 있습니다. 자세한 내용은 함수 프로토타입대한 규칙을 참조하세요.

Requirements

Requirement Value
지원되는 최소 클라이언트 Windows 2000 Professional [데스크톱 앱만 해당]
지원되는 최소 서버 Windows 2000 Server [데스크톱 앱만 해당]
Target Platform Windows
Header winuser.h(Windows.h 포함)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-chartranslation-l1-1-0(Windows 8에서 도입)

See also

CharToOem

CharToOemBuff

Conceptual

OemToCharBuff

Reference

Strings