Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IWICMetadataQueryWriter::SetMetadataByName method

Sets a metadata item to a specific location.

Syntax


HRESULT SetMetadataByName(
  [in]       LPCWSTR     wzName,
  [inconst PROPVARIANT *pvarValue
);

Parameters

wzName [in]

Type: LPCWSTR

The name of the metadata item.

pvarValue [in]

Type: const PROPVARIANT*

The metadata to set.

Return value

Type: HRESULT

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

Remarks

SetMetadataByName uses metadata query expressions to remove metadata. For more information on the metadata query language, see the Metadata Query Language Overview.

If the value set is a nested metadata block then use variant type VT_UNKNOWN and pvarValue pointing to the IWICMetadataQueryWriter of the new metadata block. The ordering of metadata items is at the discretion of the query writer since relative locations are not specified.

Requirements

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Wincodec.h

IDL

Wincodec.idl

Library

Windowscodecs.lib

DLL

Windowscodecs.dll

See also

IWICMetadataQueryWriter
Conceptual
WIC Metadata Overview
Metadata Query Language Overview
Overview of Reading and Writing Image Metadata
How-to: Re-encode a JPEG Image with Metadata
Other Resources
PROPVARIANT

 

 

Community Additions

Show:
© 2015 Microsoft