컴퓨터 프로그래밍 분야에서 HRESULT는 Windows 운영 체제 및 이전 IBM / Microsoft OS / 2 운영 체제에서 오류 조건 및 경고 조건을 나타내는 데 사용되는 데이터 유형입니다.

 

 

32비트의 signed형 정수이며 COM의 규정에 정의된 것은 아니지만 COM 인터페이스에 소속된 대부분의 함수들은 HRESULT형태의 반환 값을 가집니다. (물론 직접 만들어 사용하셔도 됩니다.)

 

(대부분의 MAPI 메서드 및 함수는 자세한 결과 정보를 제공하기 위해 HRESULT 값을 반환합니다. HRESULT 값은 COM 인터페이스 메서드에서도 널리 사용됩니다.) - MS 문서 발췌

 

 

어떤 함수가 HRESULT 형태를 사용함으로서 이 함수의 상태 정보를 리턴 받을 수 있게 됩니다.

사용방법은 BOOL형의 TRUE/FALSE와 마찬가지로 SUCCEEDED/FAILED를 사용합니다.

BOOL형과의 차이점이 있다면 반환형이 HRESULT라고 해서 반드시 값을 리턴 받지는 않아도 됩니다.

 

 

 

MS 문서에서 나온 구조입니다.

 

(출처 : https://docs.microsoft.com/en-us/previous-versions/bb446131(v=msdn.10)?redirectedfrom=MSDN)

 

HRESULT

HRESULT 11/18/2015 2 minutes to read In this article --> 4/8/2010 The HRESULT data type is a 32-bit value is used to describe an error or warning. Note Most MAPI methods and functions return HRESULT values to provide detailed result information. HRESULT va

docs.microsoft.com

 

 

 

 

(출처 : 위키백과 <번역>)

 

위키백과 본문입니다.

https://en.wikipedia.org/wiki/HRESULT

 

HRESULT - Wikipedia

In the field of computer programming, the HRESULT is a data type used in Windows operating systems, and the earlier IBM/Microsoft OS/2 operating system, to represent error conditions, and warning conditions. The original purpose of HRESULTs was to formally

en.wikipedia.org

 

 

MS에서 안내한 문서도 있습니다.

https://docs.microsoft.com/ko-kr/cpp/windows/attributes/attribute-programming-faq?view=vs-2019

 

특성 프로그래밍 FAQ

특성 프로그래밍 FAQAttribute Programming FAQ 이 문서의 내용 --> 이 항목에서는 자주 묻는 다음과 같은 질문에 대한 답변을 제시합니다.This topic answers the following frequently asked questions: HRESULT란 무엇입니�

docs.microsoft.com

 

 

 

 

 

아래의 영문 사이트에서는 각 Error에 대한 간단한 한 줄 설명을 영문으로 확인할 수 있습니다.

 

https://www.hresult.info/FACILITY_WIN32/0x8007052F

 

Error 0x8007052F | ERROR_ACCOUNT_RESTRICTION - HRESULT.info

Home / Facilities / FACILITY_WIN32 / 0x8007052F Error 0x8007052F Value: -2147023569 | 0x8007052F | 2147943727 What does it mean ? ERROR_ACCOUNT_RESTRICTION   Account restrictions are preventing this user from signing in. For example: blank passwords aren'

www.hresult.info

 

+ Recent posts