Skip to content

Latest commit

 

History

History
140 lines (109 loc) · 3.82 KB

nf-mswmdm-iwmdmoperation-beginread.md

File metadata and controls

140 lines (109 loc) · 3.82 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mswmdm.IWMDMOperation.BeginRead
IWMDMOperation::BeginRead (mswmdm.h)
The BeginRead method indicates that a "read from device" action is beginning. Windows Media Device Manager only calls this method if the application calls IWMDMStorageControl::Read and passes in this IWMDMOperation interface.
BeginRead
BeginRead method [windows Media Device Manager]
BeginRead method [windows Media Device Manager]
IWMDMOperation interface
IWMDMOperation interface [windows Media Device Manager]
BeginRead method
IWMDMOperation.BeginRead
IWMDMOperation::BeginRead
IWMDMOperationBeginRead
mswmdm/IWMDMOperation::BeginRead
wmdm.iwmdmoperation_beginread
wmdm\iwmdmoperation_beginread.htm
WMDM
e72caaac-8992-4f11-8020-0455b3d730ad
12/05/2018
BeginRead, BeginRead method [windows Media Device Manager], BeginRead method [windows Media Device Manager],IWMDMOperation interface, IWMDMOperation interface [windows Media Device Manager],BeginRead method, IWMDMOperation.BeginRead, IWMDMOperation::BeginRead, IWMDMOperationBeginRead, mswmdm/IWMDMOperation::BeginRead, wmdm.iwmdmoperation_beginread
mswmdm.h
Windows
Mssachlp.lib
Windows
19H1
IWMDMOperation::BeginRead
mswmdm/IWMDMOperation::BeginRead
c++
APIRef
kbSyntax
COM
mssachlp.lib
mssachlp.dll
IWMDMOperation.BeginRead

IWMDMOperation::BeginRead

-description

The BeginRead method indicates that a "read from device" action is beginning. Windows Media Device Manager only calls this method if the application calls IWMDMStorageControl::Read and passes in this IWMDMOperation interface.

-returns

The application should return one of the following HRESULT values.

Return code Description
S_OK
The read operation should continue.
WMDM_E_USER_CANCELLED
The read operation should be cancelled without finishing.
E_FAIL
An unspecified error occurred, and the read operation should be cancelled without finishing.

-remarks

This method is called just before the Windows Media Device Manager calls IWMDMOperation::TransferObjectData.

Examples

The following C++ code example implements the BeginRead method and outputs a message when a read-from-device action is beginning.

HRESULT BeginRead()
{
    // TODO: Display the message: "IWMDMOperation event--BeginRead."

    // If the global handle of the source file is uninitialized, fail.
    if (m_File == INVALID_HANDLE_VALUE)
        return E_FAIL;

    // Global status to let TransferObjectData know what kind of
    // operation is happening.
    m_OperationStatus = OPERATION_READ;
    return S_OK;
}

-see-also

Handling File Transfers Manually

IWMDMOperation Interface

IWMDMOperation::BeginWrite