Kernel32BeginUpdateResource Method
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static IntPtr BeginUpdateResource(
string fileName,
bool deleteExistingResources
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function BeginUpdateResource (
fileName As String,
deleteExistingResources As Boolean
) As IntPtr
Dim fileName As String
Dim deleteExistingResources As Boolean
Dim returnValue As IntPtr
returnValue = Kernel32.BeginUpdateResource(fileName,
deleteExistingResources)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr BeginUpdateResource(
[InAttribute] String^ fileName,
bool deleteExistingResources
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member BeginUpdateResource :
fileName : string *
deleteExistingResources : bool -> IntPtr
No code example is currently available or this language may not be supported.
- fileName String
-
The binary file in which to update resources.
An application must be able to obtain write-access to this file;
the file referenced by pFileName cannot be currently executing.
If fileName does not specify a full path,
the system searches for the file in the current directory.
- deleteExistingResources Boolean
-
Indicates whether to delete the fileName parameter's existing resources.
If this parameter is ,
existing resources are deleted and the updated file includes only
resources added with the UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) function.
If this parameter is ,
the updated file includes existing resources unless they are
explicitly deleted or replaced by using UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32) function.
IntPtr
If the function succeeds,
the return value is a handle that can be used by the
UpdateResource(SafeModuleHandle, ResourceType, IntPtr, UInt16, IntPtr, UInt32)
and
EndUpdateResource(SafeModuleHandle, Boolean) functions.
The return value is
Zero if the specified file is not a PE (Portable-Executable),
the file does not exist, or the file cannot be opened for writing.
To get extended error information, call
GetLastWin32Error.