EndUpdateResourceA function

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

Syntax

BOOL EndUpdateResourceA(
  HANDLE hUpdate,
  BOOL   fDiscard
);

Parameters

hUpdate

Type: HANDLE

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

fDiscard

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.

Return Value

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.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See Also

BeginUpdateResource

Conceptual

Reference

Resources

UpdateResource