Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ISchemaProvider::LookupAuthoredNamedEntity method

Finds named entities of a specified type in a tokenized string, and returns the value of the entity and the number of tokens the entity value occupies.

Syntax


HRESULT LookupAuthoredNamedEntity(
  [in]  IEntity          *pEntity,
  [in]  LPCWSTR          pszInputString,
  [in]  ITokenCollection *pTokenCollection,
  [in]  ULONG            cTokensBegin,
  [out] ULONG            *pcTokensLength,
  [out] LPWSTR           *ppszValue
);

Parameters

pEntity [in]

Type: IEntity*

A pointer to an IEntity object identifying the type of named entity to locate.

pszInputString [in]

Type: LPCWSTR

An input string in which to search for named entity keywords.

pTokenCollection [in]

Type: ITokenCollection*

A pointer to the tokenization of the string in the pszInputString parameter.

cTokensBegin [in]

Type: ULONG

The zero-based position of a token in the pTokenCollection from which to start searching.

pcTokensLength [out]

Type: ULONG*

Receives a pointer to the number of tokens covered by the named entity keyword that was found.

ppszValue [out]

Type: LPWSTR*

Receives a pointer to the value of the named entity that was found, as a Unicode string. The caller must free the string by calling CoTaskMemFree. An INamedEntity object can be obtained by calling the GetNamedEntity method of pEntity and passing the string that was received in this parameter.

Return value

Type: HRESULT

Returns S_OK if the token sequence beginning at position cTokensBegin denotes a named entity of the specified (entity) type. If there is no such token sequence, returns S_FALSE.

Remarks

The method finds only named entities authored with keywords in the schema, not named entities recognized by an IConditionGenerator object.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Structuredquery.h

IDL

Structuredquery.idl

 

 

Community Additions

ADD
Show:
© 2015 Microsoft