Επεξεργασία

Κοινή χρήση μέσω


IActionProgress::UpdateProgress method (shobjidl_core.h)

Updates the progress of an action to the UI.

Syntax

HRESULT UpdateProgress(
  [in] ULONGLONG ulCompleted,
  [in] ULONGLONG ulTotal
);

Parameters

[in] ulCompleted

Type: ULONGLONG

The amount of the action completed.

[in] ulTotal

Type: ULONGLONG

The total amount of the action.

Return value

Type: HRESULT

Return S_OK if successful, or an error value otherwise.

Remarks

This method should be called periodically to update the progress of the action. The implementing class may interpret these values in any way desired, although the values of ulCompleted and ulTotal should be interpreted relative to one another to determine a meaningful progress amount. Often, a percentage is desired, in which case the value of ulCompleted should be divided by ulTotal, and the result multiplied by a value of 100.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shobjidl.idl