IContextNode::GetType メソッド

IContextNode オブジェクトの型を取得します。

構文

HRESULT GetType(
  [out] GUID *pContextNodeType
);

パラメーター

pContextNodeType [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 エディション [デスクトップ アプリのみ]
サポートされている最小のサーバー
サポートなし
Header
IACom.h (IACom_i.c も必要)
[DLL]
IACom.dll

関連項目

IContextNode

コンテキスト ノードの種類

インク分析リファレンス