Skip to content

Latest commit

 

History

History
114 lines (87 loc) · 3.65 KB

nf-mfobjects-imfattributes-copyallitems.md

File metadata and controls

114 lines (87 loc) · 3.65 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:mfobjects.IMFAttributes.CopyAllItems
IMFAttributes::CopyAllItems (mfobjects.h)
Copies all of the attributes from this object into another attribute store.
111b55bc-fb8e-45b5-a709-703acd23c4be
CopyAllItems
CopyAllItems method [Media Foundation]
CopyAllItems method [Media Foundation]
IMFAttributes interface
IMFAttributes interface [Media Foundation]
CopyAllItems method
IMFAttributes.CopyAllItems
IMFAttributes::CopyAllItems
mf.imfattributes_copyallitems
mfobjects/IMFAttributes::CopyAllItems
mf\imfattributes_copyallitems.htm
mf
111b55bc-fb8e-45b5-a709-703acd23c4be
12/05/2018
111b55bc-fb8e-45b5-a709-703acd23c4be, CopyAllItems, CopyAllItems method [Media Foundation], CopyAllItems method [Media Foundation],IMFAttributes interface, IMFAttributes interface [Media Foundation],CopyAllItems method, IMFAttributes.CopyAllItems, IMFAttributes::CopyAllItems, mf.imfattributes_copyallitems, mfobjects/IMFAttributes::CopyAllItems
mfobjects.h
Mfidl.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Mfuuid.lib
Windows
19H1
IMFAttributes::CopyAllItems
mfobjects/IMFAttributes::CopyAllItems
c++
APIRef
kbSyntax
COM
mfuuid.lib
mfuuid.dll
IMFAttributes.CopyAllItems

IMFAttributes::CopyAllItems

-description

Copies all of the attributes from this object into another attribute store.

-parameters

-param pDest [in]

A pointer to the IMFAttributes interface of the attribute store that receives the copy.

-returns

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

This method deletes all of the attributes originally stored in pDest.

Note  

When you call CopyAllItems on an IMFSample, which inherits this method, the sample time, duration, and flags are not copied to the destination sample. You must copy these values to the new sample manually.

 
This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:
  • Windows XP with Service Pack 2 (SP2) and later.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (October 2006 Update Rollup for Windows XP Media Center Edition) installed.

Examples

To copy a single attribute rather than all of the attributes, you can use the following code:

HRESULT CopyAttribute(IMFAttributes *pFrom, IMFAttributes *pTo, REFGUID guidKey)
{
    PROPVARIANT val;

    HRESULT hr = pFrom->GetItem(guidKey, &val);

    if (SUCCEEDED(hr))
    {
        hr = pTo->SetItem(guidKey, val);
        PropVariantClear(&val);
    }
    else if (hr == MF_E_ATTRIBUTENOTFOUND)
    {
        hr = S_OK;
    }
    return hr;
}

-see-also

Attributes and Properties

IMFAttributes