Share via


IContextNode::GetId 메서드

IContextNode 개체의 식별자를 검색합니다.

구문

HRESULT GetId(
  [out] GUID *pId
);

매개 변수

pId [out]

IContextNode 개체의 식별자입니다.

반환 값

반환 값에 대한 설명은 클래스 및 인터페이스 - 잉크 분석을 참조하세요.

설명

잉크 분석기는 만든 모든 컨텍스트 노드에 고유 식별자를 할당합니다. 잉크 분석 중에 잉크 분석기는 컨텍스트 노드의 식별자를 변경할 수 있습니다. 예를 들어 잉크 분석기는 한 단어 노드를 두 개의 단어 노드로 다시 분류한 다음 원래 식별자를 한 단어에 할당하고 다른 노드에 새 식별자를 할당할 수 있습니다. 또는 잉크 분석기는 두 단어 노드를 하나의 단어 노드로 다시 분류하고 원래 식별자 중 하나를 새 단어 노드에 할당할 수 있습니다.

예제

다음 예제에서는 지정된 노드, 해당 pContextNode 매개 변수에 대한 정보를 검색하는 도우미 메서드를 보여 줍니다. 이 도우미 메서드는 다음 메서드의 정보를 반환합니다.

// Helper method for collecting information about a context node.
HRESULT CMyClass::GetNodeInformation(
    IContextNode *pContextNode,
    GUID *pNodeIdentifier,
    GUID *pContextNodeType,
    IAnalysisRegion **ppAnalysisRegion,
    IContextNode **ppParentNode,
    IContextNodes **ppSubNodes)
{
    // Get the identifier of the context node.
    HRESULT hr = pContextNode->GetId(pNodeIdentifier);

    if (FAILED(hr))
    {
        return hr;
    }

    // Get the type identifier for the context node.
    hr = pContextNode->GetType(pContextNodeType);

    if (FAILED(hr))
    {
        return hr;
    }

    // Get the location of the context node.
    hr = pContextNode->GetLocation(ppAnalysisRegion);

    if (FAILED(hr))
    {
        return hr;
    }

    // Get the parent node of the context node.
    hr = pContextNode->GetParentNode(ppParentNode);

    if (FAILED(hr))
    {
        if ((*ppAnalysisRegion) != NULL)
        {
            (*ppAnalysisRegion)->Release();
            (*ppAnalysisRegion) = NULL;
        }
        return hr;
    }

    // Get the subnodes of the context node.
    hr = pContextNode->GetSubNodes(ppSubNodes);

    if (FAILED(hr))
    {
        if (*ppAnalysisRegion)
        {
            (*ppAnalysisRegion)->Release();
            (*ppAnalysisRegion) = NULL;
        }
        if (*ppParentNode)
        {
            (*ppParentNode)->Release();
            (*ppParentNode) = NULL;
        }
        return hr;
    }

    return hr;
}

요구 사항

요구 사항
지원되는 최소 클라이언트
Windows XP 태블릿 PC 버전 [데스크톱 앱만 해당]
지원되는 최소 서버
지원되는 버전 없음
헤더
IACom.h(IACom_i.c 필요)
DLL
IACom.dll

추가 정보

IContextNode

잉크 분석 참조