IQueryParser::Parse method (structuredquery.h)

Parses an input string that contains Structured Query keywords and/or contents to produce an IQuerySolution object.


  [in]          LPCWSTR        pszInputString,
  [in]          IEnumUnknown   *pCustomProperties,
  [out, retval] IQuerySolution **ppSolution


[in] pszInputString


A pointer to the Unicode input string to be parsed.

[in] pCustomProperties

Type: IEnumUnknown*

An enumeration of IRichChunk objects, one for each custom property the application has recognized. This parameter can be NULL, which is equivalent to an empty enumeration.

[out, retval] ppSolution

Type: IQuerySolution**

Receives an IQuerySolution object. The caller must release it by calling its IUnknown::Release method.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


For each IRichChunk object, the position information identifies the character span of the custom property, the string value is the name of an actual property, and the PROPVARIANT is unused. Although any property could be used, these generic properties are included specifically for this purpose:

  • System.StructuredQuery.CustomProperty.Boolean
  • System.StructuredQuery.CustomProperty.DateTime
  • System.StructuredQuery.CustomProperty.Integer
  • System.StructuredQuery.CustomProperty.FloatingPoint
  • System.StructuredQuery.CustomProperty.String
An application can use them in the enumeration passed in the pCustomProperties parameter and look for them in the resulting condition tree.


Minimum supported client Windows XP with SP2, Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 with SP1 [desktop apps only]
Target Platform Windows
Header structuredquery.h
Redistributable Windows Desktop Search (WDS) 3.0