mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
build test
This commit is contained in:
parent
520657e953
commit
a593d68c42
|
@ -174,7 +174,7 @@ func newSearcher(isV4, isTCP bool) *searcher {
|
|||
func getTransportTable(fn uintptr, family int, class int) ([]byte, error) {
|
||||
for size, buf := uint32(8), make([]byte, 8); ; {
|
||||
ptr := unsafe.Pointer(&buf[0])
|
||||
err, _, _ := syscall.Syscall6(fn, 6, uintptr(ptr), uintptr(unsafe.Pointer(&size)), 0, uintptr(family), uintptr(class), 0)
|
||||
err, _, _ := syscall.SyscallN(fn, 6, uintptr(ptr), uintptr(unsafe.Pointer(&size)), 0, uintptr(family), uintptr(class), 0)
|
||||
|
||||
switch err {
|
||||
case 0:
|
||||
|
@ -205,11 +205,13 @@ func getExecPathFromPID(pid uint32) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer windows.CloseHandle(h)
|
||||
defer func(handle windows.Handle) {
|
||||
_ = windows.CloseHandle(handle)
|
||||
}(h)
|
||||
|
||||
buf := make([]uint16, syscall.MAX_LONG_PATH)
|
||||
size := uint32(len(buf))
|
||||
r1, _, err := syscall.Syscall6(
|
||||
r1, _, err := syscall.SyscallN(
|
||||
queryProcName, 4,
|
||||
uintptr(h),
|
||||
uintptr(1),
|
||||
|
|
Loading…
Reference in New Issue
Block a user