Microsoft DirectX 8.1 (C++)

IMetaPropertyType::get_Cond

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The get_Cond method creates and retrieves a MetaPropertyCondition object that can be used with other MetaPropertyCondition objects in relational and logical evaluations.

Syntax

HRESULT get_Cond(
  BSTR  bstrCond,
  long  lang,
  VARIANT  varValue,
  IMetaPropertyCondition**  pppropcond
);

Parameters

bstrCond

[in]  Specifies the desired comparison. This parameter must be one of the following strings.

Value Description
= Equal
!= or <> Not equal
< Less than
<= Less than or equal
> Greater than
>= Greater than or equal
LIKE Matching character pattern. For more information, see the SQL Server documentation.
NOT LIKE Nonmatching character pattern

lang

[in]  Specifies the language of the MetaProperty object on which to base the condition.

varValue

[in]  Specifies the value of the MetaProperty object on which to base the condition.

pppropcond

[out]  Address of a variable to receive the IMetaPropertyCondition interface of the retrieved object.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
E_INVALIDARG bstrCond contains an invalid condition.
E_OUTOFMEMORY Insufficient memory to create the object.
E_POINTER Data cannot be read from or written to a supplied address.

Remarks

This method can be used instead of IMetaProperty::get_Cond to create a condition based on a metaproperty that does not exist. Internally, the method uses the MetaPropertyType object plus the specified language and value to create a temporary MetaProperty object. The IMetaProperty::get_Cond method of the temporary MetaProperty object is then used to create the MetaPropertyCondition object.

See Also