IContextNode::GetId-Methode
Ruft den Bezeichner für das IContextNode-Objekt ab.
Syntax
HRESULT GetId(
[out] GUID *pId
);
Parameter
-
pId [ out]
-
Der Bezeichner für das IContextNode-Objekt.
Rückgabewert
Eine Beschreibung der Rückgabewerte finden Sie unter Klassen und Schnittstellen – Ink-Analyse.
Hinweise
Das Ink-Analyzer weist allen erstellten Kontextknoten einen eindeutigen Bezeichner zu. Während der Ink-Analyse kann das Ink Analyzer den Bezeichner für einen Kontextknoten ändern. Beispielsweise kann das Ink-Analyseprogramm einen Wortknoten als zwei Wortknoten neu klassifiziert und dann den ursprünglichen Bezeichner einem und einem neuen Bezeichner dem anderen zuweisen. Oder das Ink-Analyseprogramm klassifiziert zwei Wortknoten möglicherweise neu als einen Wortknoten und weist dem neuen Wortknoten einen der ursprünglichen Bezeichner zu.
Beispiele
Das folgende Beispiel zeigt eine Hilfsmethode, die Informationen zu einem angegebenen Knoten, seinem pContextNode-Parameter, abruft. Diese Hilfsmethode gibt Informationen aus den folgenden Methoden zurück.
- IContextNode::GetId
- IContextNode::GetType
- IContextNode::GetLocation
- IContextNode::GetParentNode
// 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;
}
Anforderungen
| Anforderung | Wert |
|---|---|
| Unterstützte Mindestversion (Client) |
Windows Nur Desktop-Apps der XP Tablet PC Edition [] |
| Unterstützte Mindestversion (Server) |
Nicht unterstützt |
| Header |
|
| DLL |
|