IWICImagingFactory::CreateQueryWriterFromReader method (wincodec.h)

Creates a new instance of a query writer based on the given query reader. The query writer will be pre-populated with metadata from the query reader.


HRESULT CreateQueryWriterFromReader(
  [in]  IWICMetadataQueryReader *pIQueryReader,
  [in]  const GUID              *pguidVendor,
  [out] IWICMetadataQueryWriter **ppIQueryWriter


[in] pIQueryReader

Type: IWICMetadataQueryReader*

The IWICMetadataQueryReader to create the IWICMetadataQueryWriter from.

[in] pguidVendor

Type: const GUID*

The GUID for the preferred metadata writer vendor. Use NULL if no preferred vendor.

[out] ppIQueryWriter

Type: IWICMetadataQueryWriter**

When this method returns, contains a pointer to a new metadata writer.

Return value


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


Minimum supported client Windows XP with SP2, Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header wincodec.h
Library Windowscodecs.lib
DLL Windowscodecs.dll

See also



Metadata Query Language Overview

Overview of Reading and Writing Image Metadata

WIC Metadata Overview