Freigeben über


IMFByteStream::BeginWrite Method

Begins an asynchronous write operation to the stream.

Syntax

HRESULT BeginWrite(
  [in]  const BYTE *pb,
  [in]  ULONG cb,
  [in]  IMFAsyncCallback *pCallback,
  [in]  IUnknown *punkState
);

Parameter

  • pb [in]
    Pointer to a buffer containing the data to write.

  • cb [in]
    Size of the buffer in bytes.

  • pCallback [in]
    Pointer to the IMFAsyncCallback interface of a callback object. The caller must implement this interface.

  • punkState [in]
    Pointer to the IUnknown interface of a state object, defined by the caller. This parameter can be NULL. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.

Rückgabewert

Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.

Hinweise

When all of the data has been written to the stream, the callback object's IMFAsyncCallback::Invoke method is called. At that point, the application should call IMFByteStream::EndWrite to complete the asynchronous request.

Do not reallocate, free, or write to the buffer while an asynchronous write is still pending.

This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:

  • Windows XP mit Service Pack 2 (SP2) und höher.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (Oktober 2006 Updaterollup für Windows XP Media Center Edition) installed.

Anforderungen

Mindestens unterstützter Client

Windows Vista

Mindestens unterstützter Server

Windows Server 2008

Header

Mfobjects.h (include Mfidl.h)

Bibliothek

Mfuuid.lib

Siehe auch

IMFByteStream