Share via


IProductCatalog3::RemoveSpecificationSea MethodrchClause [C++]

Use this method to remove the last constraint from a specified specification search.

Definition

[C++]

HRESULT IProductCatalog3::RemoveSpecificationSearchClause(VARIANT*pstrSearchHandle,
 BSTR*pstrPoppedClause);

[Visual Basic]

Function RemoveSpecificationSearchClause(pstrSearchHandle As Variant) As String

Parameters

  • pstrSearchHandle[C++]
    [in, out] A VARIANT that contains the specification search handle from which a constraint is to be removed.
  • pstrSearchHandle[Visual Basic]
    A Variant that contains the specification search handle from which a constraint is to be removed.
  • pstrPoppedClause[C++]
    [out, retval] A pointer to a BSTR used to return the removed clause.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] If this method completes successfully, it returns a String that contains the removed clause.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

The following table describes the custom COM errors this method can return.

Constant Value Description
E_CAT_INVALID_PARAMETER

[C++] 0x889800B6

[Visual Basic] &H889800B6

The input parameter <parameter number> is invalid.
E_CAT_INVALID_SPECSEARCH_HANDLE

[C++] 0x8898010D

[Visual Basic] &H8898010D

The search handle that you specified is invalid. The search handle should be of the form [CatalogName][CategoryName] AND (Search Clause1) AND (SearchClause2) ....

Remarks

[C++] The pstrSearchHandle and pstrPoppedClause parameters contain valid data only if the method was accessed successfully.

This method always removes the last constraint that was added to the search using the AddSpecificationSearchClause method. The returned string will be in the same form as the original constraint.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

[Visual Basic]

Example

'strSearchHandle contains a search handle returned 
'from AddSpecificationSearchClause or BeginSpecificationSearch.
'strRemovedClause will contain the removed clause after the call returns.
Set strRemovedClause = myProductCatalog.RemoveSpecificationSearchClause(strSearchHandle)

See Also

[C++]ProductCatalog Object

[Visual Basic]ProductCatalog Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.