다음을 통해 공유


IDebugHostType2::GetTypedefBaseType 메서드(dbgmodel.h)

GetTypedefBaseType 메서드는 typedef의 즉각적인 정의를 반환합니다. 이 예제에서는 다음을 수행합니다.

typedef MYSTRUCT *PMYSTRUCT;
typedef PMYSTRUCT PTRMYSTRUCT;

이 메서드는 PMYSTRUCT의 경우 MYSTRUCT *를 반환하고 PTRMYSTRUCT의 경우 PMYSTRUCT를 반환합니다. 자세한 내용은 IDebugHostType2::IsTypedef를 참조하세요.

구문

HRESULT GetTypedefBaseType(
  IDebugHostType2 **baseType
);

매개 변수

baseType

typedef가 정의인 즉시(첫 번째 수준) 형식을 반환합니다. typedef가 다른 typedef의 정의인 경우 정의 체인의 최종 해제가 아닌 해당 typedef를 반환합니다.

반환 값

이 메서드는 성공 또는 실패를 나타내는 HRESULT를 반환합니다.

설명

예제 코드

ComPtr<IDebugHostType> spType; /* get a typedef type (only FindTypeByName since 
                                  the compiler usually emits base types for data) */

ComPtr<IDebugHostType2> spType2;
if (SUCCEEDED(spType.As(&spType2)))
{
    ComPtr<IDebugHostType> spBaseType;
    if (SUCCEEDED(spType2->GetTypedefBaseType(&spBaseType)))
    {
        // Returns the immediate base type of the typedef.  This may 
        // be another typedef.
    }
}

요구 사항

요구 사항
헤더 dbgmodel.h

추가 정보

IDebugHostType2 인터페이스