Share via


IAsyncOperation::SetAsyncMode method

Called by a drop source to specify whether the data object supports asynchronous data extraction.

Syntax

HRESULT SetAsyncMode(
  [in] BOOL fDoOpAsync
);

Parameters

  • fDoOpAsync [in]
    Type: BOOL

    A Boolean value that is set to VARIANT_TRUE to indicate that an asynchronous operation is supported, or VARIANT_FALSE otherwise. Its default value is VARIANT_FALSE.

Return value

Type: HRESULT

Returns S_OK if successful or a COM error value otherwise.

Remarks

This method is called by the drop source to indicate that the data object supports asynchronous data extraction. Store the fDoOpAsync for later use by IAsyncOperation::GetAsyncMode. The drop target determines whether asynchronous data extraction is supported by calling IAsyncOperation::GetAsyncMode to retrieve the fDoOpAsync value.

If fDoOpAsync is set to VARIANT_TRUE, SetAsyncMode must call IAsyncOperation::AddRef, and store the interface pointer for use by IAsyncOperation::EndOperation.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shldisp.h

IDL

Shldisp.idl

DLL

Shell32.dll (version 5.0 or later)

See also

IAsyncOperation