Kernel32DiscardVirtualMemory(IntPtr, UInt32) Method
Discards the memory contents of a range of memory pages, without decommitting the memory.
The contents of discarded memory is undefined and must be rewritten by the application.
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", ExactSpelling = true, SetLastError = true)]
public static Win32ErrorCode DiscardVirtualMemory(
IntPtr address,
uint size
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function DiscardVirtualMemory (
address As IntPtr,
size As UInteger
) As Win32ErrorCode
Dim address As IntPtr
Dim size As UInteger
Dim returnValue As Win32ErrorCode
returnValue = Kernel32.DiscardVirtualMemory(address,
size)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true, SetLastError = true)]
static Win32ErrorCode DiscardVirtualMemory(
IntPtr address,
unsigned int size
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true, SetLastError = true)>]
static member DiscardVirtualMemory :
address : IntPtr *
size : uint32 -> Win32ErrorCode
No code example is currently available or this language may not be supported.
- address IntPtr
-
Page-aligned starting address of the memory to discard.
- size UInt32
-
Size, in bytes, of the memory region to discard.
size must be an integer multiple of the system page size.
Win32ErrorCode
Returns
ERROR_SUCCESS if successful.
Returns a System Error Code (
Win32ErrorCode) otherwise.