Files
wehub-resource-sync 36b3af2e3d
PR Check / Code Quality: Format (push) Failing after 1s
PR Check / Code Quality: Lint (darwin) (push) Failing after 0s
PR Check / Code Quality: Lint (freebsd) (push) Failing after 1s
PR Check / Code Quality: Lint (windows) (push) Failing after 1s
PR Check / Code Quality: Lint (linux) (push) Failing after 1s
PR Check / Security: Vulnerability Scan (push) Failing after 0s
Update Documentation / update-docs (push) Failing after 2s
PR Check / Code Quality: Vendor (push) Failing after 1s
PR Check / Code Quality: Coverage (push) Failing after 0s
PR Check / Tests: Unit (macos-latest) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04-arm) (push) Has been cancelled
PR Check / Tests: Unit (windows-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:22:06 +08:00

21 lines
587 B
Go

//go:build windows
package target
import (
"testing"
"unsafe"
)
// rmUniqueProcess / rmProcessInfo must match the Win32 structs byte-for-byte or
// RmGetList misreads the kernel-filled buffer. RM_PROCESS_INFO = 12 (unique
// process) + 512 (app name) + 128 (service name) + 16 (four 32-bit fields) = 668.
func TestRmProcessInfoSize(t *testing.T) {
if got := unsafe.Sizeof(rmUniqueProcess{}); got != 12 {
t.Errorf("sizeof(rmUniqueProcess) = %d, want 12", got)
}
if got := unsafe.Sizeof(rmProcessInfo{}); got != 668 {
t.Errorf("sizeof(rmProcessInfo) = %d, want 668", got)
}
}