IMimeMessage::QueryProp method

Compares the value of a property in the root header of the message with the specified string.

Syntax

HRESULT QueryProp(
  [in] LPCSTR  pszName,
  [in] LPCSTR  pszCriteria,
  [in] boolean fSubString,
  [in] boolean fCaseSensitive
);

Parameters

pszName [in]

Type: LPCSTR

Specifies the property name or ID.

pszCriteria [in]

Type: LPCSTR

Specifies the string to compare the property to.

fSubString [in]

Type: boolean

Specifies whether pszCriteria is a sub-string of the property.

Value Meaning
false
pszCriteria equals the value of the property.
true
pszCriteria is a sub-string of the property.

fCaseSensitive [in]

Type: boolean

Specifies whether the string comparison is case-sensitive.

Value Meaning
false
The string comparison is case-insensitive.
true
The string comparison is case-sensitive.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates that the values are equal.
S_FALSE
Indicates that the values are not equal.
E_FAIL
Indicates that an unknown error has occurred.
E_INVALIDARG
Indicates that pszName or pszCriteria is NULL.
MIME_E_VARTYPE_NO_CONVERT
Indicates that the value of the property specified by pszName cannot be converted to a string.

Remarks

A property ID can also be passed into this method through the pszName parameter using the PIDTOSTR macro.

This method is equivalent to:

pMessage->BindToObject(HBODY_ROOT, IID_IMimePropertySet, (LPVOID *)&pPropertySet);

pPropertySet->QueryProp(pszName, pszCriteria, fSubString, fCaseSensitive);

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Product
Outlook Express 6.0
Header
Mimeole.h
IDL
Mimeole.idl
DLL
Inetcomm.dll (version 6.0 or later)