process

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MEM_COMMIT  = 0x1000
	MEM_PRIVATE = 0x20000
)
View Source
const (
	CREATE_NEW_CONSOLE       = 0x00000010
	CREATE_NEW_PROCESS_GROUP = 0x00000200
)

Variables

This section is empty.

Functions

func OpenProcess

func OpenProcess(pid uint32) (windows.Handle, error)

OpenProcess opens an existing local process object.

func ReadProcessMemory

func ReadProcessMemory(hProcess windows.Handle, address uintptr, size uintptr) ([]byte, error)

ReadProcessMemory reads data from an area of memory in a specified process.

Types

type MEMORY_BASIC_INFORMATION

type MEMORY_BASIC_INFORMATION struct {
	BaseAddress       uintptr
	AllocationBase    uintptr
	AllocationProtect uint32
	RegionSize        uintptr
	State             uint32
	Protect           uint32
	Type              uint32
}

MEMORY_BASIC_INFORMATION structure for VirtualQueryEx

type MemoryRegion

type MemoryRegion struct {
	BaseAddress uintptr
	RegionSize  uintptr
}

MemoryRegion represents a continuous memory block

func GetMemoryRegions

func GetMemoryRegions(hProcess windows.Handle) ([]MemoryRegion, error)

GetMemoryRegions returns a list of committed private memory regions for the process.

type ProcessManager

type ProcessManager struct {
}

func NewProcessManager

func NewProcessManager() *ProcessManager

func (*ProcessManager) FindMainWeChatPid

func (pm *ProcessManager) FindMainWeChatPid() uint32

func (*ProcessManager) FindWeChatPath

func (pm *ProcessManager) FindWeChatPath() string

func (*ProcessManager) GetProcessId

func (pm *ProcessManager) GetProcessId(name string) (uint32, error)

func (*ProcessManager) GetWeChatVersion

func (pm *ProcessManager) GetWeChatVersion(wechatDir string) string

func (*ProcessManager) IsProcessRunning

func (pm *ProcessManager) IsProcessRunning(name string) bool

func (*ProcessManager) KillProcess

func (pm *ProcessManager) KillProcess(name string) error

func (*ProcessManager) LaunchWeChat

func (pm *ProcessManager) LaunchWeChat(path string) error

func (*ProcessManager) WaitForWeChatWindow

func (pm *ProcessManager) WaitForWeChatWindow(timeoutSeconds int) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL