IMAPIProgress::GetMax

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Returns the maximum number of items in the operation for which progress information is displayed.

HRESULT GetMax(
  ULONG FAR * lpulMax
);

Parameters

  • lpulMax
    [out] A pointer to the maximum number of items in the operation.

Return Value

  • S_OK
    The maximum number of items in the operation has been retrieved.

Remarks

The maximum value represents the end of the operation in numeric form. The value can be a global maximum value, used to represent the scope of the entire progress display, or a local value, used to represent only a part of the display.

The value of the flag setting affects whether the progress object understands the maximum value to be local or global. When the MAPI_TOP_LEVEL flag is set, the maximum value is considered to be global and is used to calculate progress for the entire operation. When MAPI_TOP_LEVEL is not set, the maximum value is considered to be local, and providers use it internally to display progress for lower level subobjects. Progress objects save the local maximum value only to return it to a provider through a GetMax call.

For more information about how and when to make calls to a progress object, see How to: Display a Progress Indicator.

Notes to Implementers

Initialize the maximum value to 1000. Service providers can reset this value by calling the IMAPIProgress::SetLimits method. For more information about how to implement GetMax and the other IMAPIProgress methods, see Implementing a Progress Indicator.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

MAPIProgress.cpp

CMAPIProgress::GetMax

MFCMAPI uses the IMAPIProgress::GetMax method to get the maximum value for the progress object. Returns 1000 unless limits have previously been set with the IMAPIProgress::SetLimits method.

See Also

Reference

IMAPIProgress::GetMin

IMAPIProgress::Progress

IMAPIProgress::SetLimits

IMAPIProgress : IUnknown

Concepts

MFCMAPI as a Code Sample

How to: Display a Progress Indicator

Implementing a Progress Indicator