EndUpdateResource function
Commits or discards changes made prior to a call to UpdateResource.
Syntax
BOOL WINAPI EndUpdateResource( _In_ HANDLE hUpdate, _In_ BOOL fDiscard );
Parameters
- hUpdate [in]
-
Type: HANDLE
A module handle returned by the BeginUpdateResource function, and used by UpdateResource, referencing the file to be updated.
- 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.
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] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
EndUpdateResourceW (Unicode) and EndUpdateResourceA (ANSI) |
See also
- Reference
- BeginUpdateResource
- UpdateResource
- Conceptual
- Resources