mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 16:47:27 -04:00
windows: add low level memory related syscalls
Adds VirtualQuery, VirtualQueryEx, VirtualProtectEx, ReadProcessMemory, and WriteProcessMemory. VirtualProtect already exists. https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualquery https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualqueryex https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualprotectex https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory Change-Id: I609a09641c502d8d3802036123e0784b7c76e99b GitHub-Last-Rev: 368f8c7b620607aab2a1b8fefff656c38cb0dd6b GitHub-Pull-Request: golang/sys#117 Reviewed-on: https://go-review.googlesource.com/c/sys/+/352249 Trust: Alex Brainman <alex.brainman@gmail.com> Trust: Emmanuel Odeke <emmanuel@orijtech.com> Trust: Benny Siegert <bsiegert@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
@@ -35,3 +35,14 @@ const (
|
||||
QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
|
||||
QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004
|
||||
)
|
||||
|
||||
type MemoryBasicInformation struct {
|
||||
BaseAddress uintptr
|
||||
AllocationBase uintptr
|
||||
AllocationProtect uint32
|
||||
PartitionId uint16
|
||||
RegionSize uintptr
|
||||
State uint32
|
||||
Protect uint32
|
||||
Type uint32
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user