Partager via


IWMDMProgress::Begin

banner art

The Begin method indicates that an operation is beginning. An estimate of the duration of the operation is provided when possible.

Syntax

HRESULT Begin(DWORDdwEstimatedTicks);

Parameters

dwEstimatedTicks

[in]  DWORD specifying the estimated number of ticks that are needed for the operation to complete.

Return Values

The application should return one of the following HRESULT values.

Return code Description
S_OK The operation should continue.
WMDM_E_USER_CANCELLED Windows Media Device Manager should cancel the current operation without waiting for it to finish. If the application is using block mode, then Windows Media Device Manager will return this error to the application.

Remarks

This operation is called by various methods to indicate that an operation is beginning. The number of ticks passed in dwEstimatedTicks is an estimate of how many ticks are needed for the operation to complete. During the course of the operation, the Progress method is called to indicate how many ticks have transpired. Applications can use the estimate to configure display mechanisms that show progress.

The IWMDMProgress3::Begin3 method provides more information about what action is occurring.

Example Code

The following C++ code is an implementation of the Begin method.

HRESULT Begin(DWORD  dwEstimatedTicks)
{
    // TODO: Display the message: "IWMDMProgress::Begin called.: "
    // followed by the dwEstimatedTicks value.
    return S_OK;
}

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also