Skip to content

Latest commit

 

History

History
114 lines (75 loc) · 4.15 KB

nf-winbase-endupdateresourcea.md

File metadata and controls

114 lines (75 loc) · 4.15 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:winbase.EndUpdateResourceA
EndUpdateResourceA function (winbase.h)
Commits or discards changes made prior to a call to UpdateResource. (ANSI)
EndUpdateResourceA
winbase/EndUpdateResourceA
menurc\endupdateresource.htm
menurc
VS|winui|~\winui\windowsuserinterface\resources\introductiontoresources\resourcereference\resourcefunctions\endupdateresource.htm
12/05/2018
EndUpdateResource, EndUpdateResource function [Menus and Other Resources], EndUpdateResourceA, EndUpdateResourceW, _win32_EndUpdateResource, _win32_endupdateresource_cpp, menurc.endupdateresource, winbase/EndUpdateResource, winbase/EndUpdateResourceA, winbase/EndUpdateResourceW, winui._win32_endupdateresource
winbase.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
EndUpdateResourceW (Unicode) and EndUpdateResourceA (ANSI)
Kernel32.lib
Kernel32.dll
Windows
19H1
EndUpdateResourceA
winbase/EndUpdateResourceA
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
EndUpdateResource
EndUpdateResourceA
EndUpdateResourceW

EndUpdateResourceA function

-description

Commits or discards changes made prior to a call to UpdateResource.

-parameters

-param hUpdate [in]

Type: HANDLE

A module handle returned by the BeginUpdateResource function, and used by UpdateResource, referencing the file to be updated.

-param fDiscard [in]

Type: BOOL

Indicates whether to write the resource updates to the file. If this parameter is TRUE, no changes are made. If it is FALSE, the changes are made: the resource updates will take effect.

-returns

Type: BOOL

Returns TRUE if the function succeeds; FALSE otherwise. If the function succeeds and fDiscard is TRUE, then no resource updates are made to the file; otherwise all successful resource updates are made to the file. To get extended error information, call GetLastError.

-remarks

Before you call this function, make sure all file handles other than the one returned by BeginUpdateResource are closed.

This function can update resources within modules that contain both code and resources. There are restrictions on resource updates in LN files and .mui files, both of which contain Resource Configuration data; details of the restrictions are in the reference for the UpdateResource function.

Examples

For an example, see Updating Resources.

Note

The winbase.h header defines EndUpdateResource as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

BeginUpdateResource

Conceptual

Reference

Resources

UpdateResource