C# Класс Platform.WindowsAPI.Kernel32

Показать файл Открыть проект

Открытые методы

Метод Описание
CopyMemory ( void destination, void source, ulong size ) : void

Copies data of a memory block with a given size from source address to destination address. The source and destination blocks are permitted to overlap.

GetProcessHeapOrFail ( ) : IntPtr
HeapAlloc ( ulong size ) : void*

Allocates a memory block of given size. The allocated memory is automatically initialized to zero.

HeapFree ( void block ) : void

Frees a memory block.

HeapReAlloc ( void block, ulong size ) : void*

Re-allocates a memory block. If the reallocation request is for a larger size, the additional region of memory is automatically initialized to zero.

HeapSize ( void block ) : ulong

Returns the size of a memory block.

MoveMemory ( void destination, void source, ulong size ) : void

Moves a block of memory from one location to another.

VirtualAlloc ( ulong sizeInBytes, MemoryAllocationType allocationType, MemoryProtection protection ) : void*

Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process. Memory allocated by this function is automatically initialized to zero.

VirtualFree ( void block, ulong sizeInBytes, MemoryFreeType freeType ) : void

Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.

Приватные методы

Метод Описание
CopyMemory ( IntPtr destinationAddress, IntPtr sourceAddress, UIntPtr sizeInBytes ) : void
GetProcessHeap ( ) : IntPtr
HeapAlloc ( IntPtr heapHandle, HeapFlags flags, UIntPtr sizeInBytes ) : IntPtr
HeapFree ( IntPtr heapHandle, HeapFlags flags, IntPtr blockAddress ) : bool
HeapReAlloc ( IntPtr heapHandle, HeapFlags flags, IntPtr blockAddress, UIntPtr sizeInBytes ) : IntPtr
HeapSize ( IntPtr heapHandle, HeapFlags flags, IntPtr blockAddress ) : UIntPtr
MoveMemory ( IntPtr destinationAddress, IntPtr sourceAddress, UIntPtr sizeInBytes ) : void
VirtualAlloc ( IntPtr blockAddress, UIntPtr sizeInBytes, MemoryAllocationType allocationType, MemoryProtection protection ) : IntPtr
VirtualFree ( IntPtr blockAddress, UIntPtr sizeInBytes, MemoryFreeType freeType ) : bool

Описание методов

CopyMemory() публичный статический Метод

Copies data of a memory block with a given size from source address to destination address. The source and destination blocks are permitted to overlap.
public static CopyMemory ( void destination, void source, ulong size ) : void
destination void The pointer to destination where a memory block will be copied.
source void The pointer to a source memory block.
size ulong The size of a memory block.
Результат void

GetProcessHeapOrFail() публичный статический Метод

public static GetProcessHeapOrFail ( ) : IntPtr
Результат System.IntPtr

HeapAlloc() публичный статический Метод

Allocates a memory block of given size. The allocated memory is automatically initialized to zero.
public static HeapAlloc ( ulong size ) : void*
size ulong The size of a memory block.
Результат void*

HeapFree() публичный статический Метод

Frees a memory block.
public static HeapFree ( void block ) : void
block void The pointer to a memory block to be freed.
Результат void

HeapReAlloc() публичный статический Метод

Re-allocates a memory block. If the reallocation request is for a larger size, the additional region of memory is automatically initialized to zero.
public static HeapReAlloc ( void block, ulong size ) : void*
block void The pointer to a memory block.
size ulong The size (bytes) of a memory block.
Результат void*

HeapSize() публичный статический Метод

Returns the size of a memory block.
public static HeapSize ( void block ) : ulong
block void The pointer to a memory block.
Результат ulong

MoveMemory() публичный статический Метод

Moves a block of memory from one location to another.
public static MoveMemory ( void destination, void source, ulong size ) : void
destination void The pointer to destination where a memory block will be moved.
source void The pointer to a source memory block.
size ulong The size of a memory block.
Результат void

VirtualAlloc() публичный статический Метод

Reserves, commits, or changes the state of a region of pages in the virtual address space of the calling process. Memory allocated by this function is automatically initialized to zero.
public static VirtualAlloc ( ulong sizeInBytes, MemoryAllocationType allocationType, MemoryProtection protection ) : void*
sizeInBytes ulong The size of the region, in bytes
allocationType MemoryAllocationType The type of memory allocation.
protection MemoryProtection The memory protection for the region of pages to be allocated.
Результат void*

VirtualFree() публичный статический Метод

Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process.
public static VirtualFree ( void block, ulong sizeInBytes, MemoryFreeType freeType ) : void
block void A pointer to the base address of the region of pages to be freed.
sizeInBytes ulong The size of the region of memory to be freed, in bytes.
freeType MemoryFreeType The type of free operation.
Результат void