IRangeList::MaxOfRange method

[IRangeList::MaxOfRange is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Finds the range in the message range list that the specified value belongs to and returns the maximum value of that range.

Syntax

HRESULT MaxOfRange(
  [in]  const ULONG value,
  [out]       ULONG *pulMaxOfRange
);

Parameters

value [in]

Type: const ULONG

Specifies a ULONG that contains a value within the range whose maximum value is returned.

Value Meaning
RL_LAST_MESSAGE
((ULONG)-1)
Equivalent to "*" in an IMAP range list.

pulMaxOfRange [out]

Type: ULONG*

Receives a pointer to a ULONG that contains the maximum value in the range that includes value.

Value Meaning
RL_RANGE_ERROR
((ULONG)-1)
Indicates that value could not be found in the range list.

Return value

Type: HRESULT

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

Remarks

For example, for the range list "10 20,30,40 50", MaxOfRange(15) returns 20.

Requirements

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