Skip to content

Latest commit

 

History

History
77 lines (61 loc) · 2.94 KB

nf-shimgdata-ishellimagedata-replaceframe.md

File metadata and controls

77 lines (61 loc) · 2.94 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:shimgdata.IShellImageData.ReplaceFrame
IShellImageData::ReplaceFrame (shimgdata.h)
Replaces the current frame with a new image.
IShellImageData interface [Windows Shell]
ReplaceFrame method
IShellImageData.ReplaceFrame
IShellImageData::ReplaceFrame
ReplaceFrame
ReplaceFrame method [Windows Shell]
ReplaceFrame method [Windows Shell]
IShellImageData interface
_shell_IShellImageData_ReplaceFrame
shell.IShellImageData_ReplaceFrame
shimgdata/IShellImageData::ReplaceFrame
shell\IShellImageData_ReplaceFrame.htm
shell
f066c503-4512-46db-be50-016996b92668
12/05/2018
IShellImageData interface [Windows Shell],ReplaceFrame method, IShellImageData.ReplaceFrame, IShellImageData::ReplaceFrame, ReplaceFrame, ReplaceFrame method [Windows Shell], ReplaceFrame method [Windows Shell],IShellImageData interface, _shell_IShellImageData_ReplaceFrame, shell.IShellImageData_ReplaceFrame, shimgdata/IShellImageData::ReplaceFrame
shimgdata.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Shimgdata.idl
Shell32.dll
Windows
19H1
IShellImageData::ReplaceFrame
shimgdata/IShellImageData::ReplaceFrame
c++
APIRef
kbSyntax
COM
Shell32.dll
IShellImageData.ReplaceFrame

IShellImageData::ReplaceFrame

-description

Replaces the current frame with a new image.

-parameters

-param pImg [in]

Type: Image*

The address of the new image.

-returns

Type: HRESULT

Always returns S_OK.

-remarks

You should also call IShellImageData::DiscardEdit to ensure that any edited properties of the original image are not retained.

In the case of a multiframed image such as a .gif file, the current frame is replaced. In the case of non-multiframed images such a .jpg file, the entire image is replaced.

Replacing a frame in an animated .gif file causes that file's animation to no longer be functional. Replacing a frame in a Tagged Image File Format (TIFF) file could cause that file to lose pages, particularly if the TIFF frame's image is not the same size as the original. If possible, you should always replace a TIFF frame's image with a TIFF of the same size.

The IShellImageData implementation takes ownership of the image named in pImg and the caller should not try to use it after calling IShellImageData::ReplaceFrame.