IMFAttributes::CopyAllItems Method
Copies all of the attributes from this object into another attribute store.
Syntax
HRESULT CopyAllItems(
[in] IMFAttributes *pDest
);
Parameter
- pDest [in]
A pointer to the IMFAttributes interface of the attribute store that receives the copy.
Rückgabewert
Ist Methode erfolgreich, wird "S_OK" zurückgegeben. Andernfalls wird ein HRESULT-Fehlercode zurückgegeben.
Hinweise
This method deletes all of the attributes originally stored in pDest.
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.
Beispiele
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;
}
Anforderungen
Mindestens unterstützter Client |
Windows Vista |
Mindestens unterstützter Server |
Windows Server 2008 |
Header |
Mfobjects.h (include Mfidl.h) |
Bibliothek |
Mfuuid.lib |