C# Class Platform.WindowsAPI.Kernel32

Afficher le fichier Open project: Konard/LinksPlatform

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

CopyMemory() public static méthode

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.
Résultat void

GetProcessHeapOrFail() public static méthode

public static GetProcessHeapOrFail ( ) : IntPtr
Résultat System.IntPtr

HeapAlloc() public static méthode

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.
Résultat void*

HeapFree() public static méthode

Frees a memory block.
public static HeapFree ( void block ) : void
block void The pointer to a memory block to be freed.
Résultat void

HeapReAlloc() public static méthode

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.
Résultat void*

HeapSize() public static méthode

Returns the size of a memory block.
public static HeapSize ( void block ) : ulong
block void The pointer to a memory block.
Résultat ulong

MoveMemory() public static méthode

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.
Résultat void

VirtualAlloc() public static méthode

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.
Résultat void*

VirtualFree() public static méthode

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.
Résultat void