다음을 통해 공유


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

GetTypedefFinalBaseType 메서드는 typedef가 정의인 최종 형식을 반환합니다. typedef가 다른 typedef의 정의인 경우 typedef가 아닌 형식에 도달하고 해당 형식이 반환될 때까지 정의 체인을 계속 따릅니다. 이 예제에서:

typedef MYSTRUCT *PMYSTRUCT;
typedef PMYSTRUCT PTRMYSTRUCT;

이 메서드는 PMYSTRUCT 또는 PTRMYSTRUCT에서 호출될 때 MYSTRUCT * 를 반환합니다. 자세한 내용은 IDebugHostType2::IsTypedef를 참조하세요.

구문

HRESULT GetTypedefFinalBaseType(
  IDebugHostType2 **finalBaseType
);

매개 변수

finalBaseType

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> spFinalBaseType;
    if (SUCCEEDED(spType2->GetTypedefFinalBaseType(&spFinalBaseType)))
    {
        // Returns the final base type of the typedef.  This will follow the 
        // typedef chain until it reaches a base type that is *NOT* a typedef.
    }
}

요구 사항

요구 사항
헤더 dbgmodel.h

추가 정보

IDebugHostType2 인터페이스