Freigeben über


MFCreateTempFile Function

Creates a byte stream that is backed by a temporary local file.

Syntax

HRESULT MFCreateTempFile(
  MF_FILE_ACCESSMODE AccessMode,
  MF_FILE_OPENMODE OpenMode,
  MF_FILE_FLAGS fFlags,
  IMFByteStream **ppIByteStream
);

Parameter

  • AccessMode
    The requested access mode, specified as a member of the MF_FILE_ACCESSMODE enumeration.

  • OpenMode
    The behavior of the function if the file already exists or does not exist, specified as a member of the MF_FILE_OPENMODE enumeration.

  • fFlags
    Bitwise OR of values from the MF_FILE_FLAGS enumeration.

  • ppIByteStream
    Receives a pointer to the IMFByteStream interface of the byte stream. The caller must release the interface.

Rückgabewert

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

Hinweise

This function creates a file in the system temporary folder, and then returns a byte stream object for that file. The full path name of the file is storted in the MF_BYTESTREAM_ORIGIN_NAME attribute. The file is created with the FILE_FLAG_DELETE_ON_CLOSE flag, and is deleted after the byte stream is released.

This function 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

Mfapi.h

Bibliothek

Mfplat.lib

DLL

Mfplat.dll

Siehe auch

IMFByteStream

Media Foundation Functions