Microsoft DirectX 8.0

IAMOpenProgress Interface

Reports the progress of a file-open operation.

Filters that open files over a network can expose this interface. An application can use it to query the progress of the download, or to abort the download. If the network is not responsive, a method such as IGraphBuilder::RenderFile might block for an indefinite period. To prevent your application from blocking, create a worker thread that uses IAMOpenProgress to monitor the progress. The worker thread can abort the operation if a predefined timeout occurs, or in response to a command from the user.

The URL File Source filter supports this interface.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterfaceRetrieves pointers to supported interfaces.
AddRefIncrements the reference count.
ReleaseDecrements the reference count.
IAMOpenProgress methodsDescription
QueryProgressRetrieves the progress of the file-open operation.
AbortOperationAborts the file-open operation.

IAMOpenProgress::AbortOperation

IAMOpenProgress Interface

Aborts the file-open operation.

Syntax

HRESULT AbortOperation(void);

Return Value

Returns S_OK if successful, or an HRESULT value indicating the cause of the error.

IAMOpenProgress::QueryProgress

IAMOpenProgress Interface

Retrieves the progress of the file-open operation.

Syntax

HRESULT QueryProgress(
    LONGLONG *pllTotal,
    LONGLONG *pllCurrent
);

Parameters

pllTotal
[out] Pointer to a variable that receives the length of the entire file, in bytes.
pllCurrent
[out] Pointer to a variable that receives the length of the downloaded portion of the file, in bytes.

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

S_OKSuccess.
VFW_S_ESTIMATEDThe returned values are estimates.
E_UNEXPECTEDUnexpected error.