Kernel32EndUpdateResource(SafeModuleHandle, Boolean) Method

Commits or discards changes made prior to a call to UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) function.

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

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static bool EndUpdateResource(
	SafeModuleHandle hUpdate,
	bool discard
)

Parameters

hUpdate  SafeModuleHandle
A module handle returned by the BeginUpdateResource(String, Boolean) function, and used by UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32), referencing the file to be updated.
discard  Boolean
Indicates whether to write the resource updates to the file.

If this parameter is , no changes are made.

If it is , the changes are made: the resource updates will take effect.

Return Value

Boolean
Returns if the function succeeds; otherwise.

If the function succeeds and discard parameter is , 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 GetLastWin32Error.

Remarks

See Also