slidge-whatsapp 0.2.7__cp311-cp311-manylinux_2_36_aarch64.whl → 0.3.0__cp311-cp311-manylinux_2_36_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of slidge-whatsapp might be problematic. Click here for more details.
- slidge_whatsapp/contact.py +15 -3
- slidge_whatsapp/event.go +144 -48
- slidge_whatsapp/gateway.go +7 -63
- slidge_whatsapp/gateway.py +2 -3
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.h +178 -161
- slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +148 -134
- slidge_whatsapp/generated/whatsapp.c +1612 -1340
- slidge_whatsapp/generated/whatsapp.go +995 -884
- slidge_whatsapp/generated/whatsapp.py +1169 -1044
- slidge_whatsapp/generated/whatsapp_go.h +178 -161
- slidge_whatsapp/go.mod +18 -15
- slidge_whatsapp/go.sum +38 -26
- slidge_whatsapp/group.py +34 -30
- slidge_whatsapp/media/media.go +1 -1
- slidge_whatsapp/session.go +34 -17
- slidge_whatsapp/session.py +46 -14
- slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
- slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
- slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
- slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
- slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
- slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
- slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
- slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
- slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
- slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +28 -0
- slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +15 -18
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +5 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +4 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +97 -25
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +22 -10
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +10 -9
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +5 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +30 -3
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8532 -11526
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +132 -438
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +225 -73
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +21 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +884 -441
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +40 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +8 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +6 -4
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +3 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +8 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
- slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +12 -8
- slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
- slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
- slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
- slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
- slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
- slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
- slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
- slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
- slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
- slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
- slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
- slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
- slidge_whatsapp/vendor/modules.txt +43 -23
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/METADATA +5 -4
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/RECORD +208 -161
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/WHEEL +1 -1
- slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
- slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
- slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/entry_points.txt +0 -0
- {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -546,25 +546,25 @@ var (
|
|
|
546
546
|
)
|
|
547
547
|
|
|
548
548
|
func cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) {
|
|
549
|
-
r0, _, _ := syscall.
|
|
549
|
+
r0, _, _ := syscall.SyscallN(procCM_Get_DevNode_Status.Addr(), uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags))
|
|
550
550
|
ret = CONFIGRET(r0)
|
|
551
551
|
return
|
|
552
552
|
}
|
|
553
553
|
|
|
554
554
|
func cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) {
|
|
555
|
-
r0, _, _ := syscall.
|
|
555
|
+
r0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_ListW.Addr(), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags))
|
|
556
556
|
ret = CONFIGRET(r0)
|
|
557
557
|
return
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
func cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) {
|
|
561
|
-
r0, _, _ := syscall.
|
|
561
|
+
r0, _, _ := syscall.SyscallN(procCM_Get_Device_Interface_List_SizeW.Addr(), uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags))
|
|
562
562
|
ret = CONFIGRET(r0)
|
|
563
563
|
return
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
func cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) {
|
|
567
|
-
r0, _, _ := syscall.
|
|
567
|
+
r0, _, _ := syscall.SyscallN(procCM_MapCrToWin32Err.Addr(), uintptr(configRet), uintptr(defaultWin32Error))
|
|
568
568
|
ret = Errno(r0)
|
|
569
569
|
return
|
|
570
570
|
}
|
|
@@ -574,7 +574,7 @@ func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups,
|
|
|
574
574
|
if resetToDefault {
|
|
575
575
|
_p0 = 1
|
|
576
576
|
}
|
|
577
|
-
r1, _, e1 := syscall.
|
|
577
|
+
r1, _, e1 := syscall.SyscallN(procAdjustTokenGroups.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
|
|
578
578
|
if r1 == 0 {
|
|
579
579
|
err = errnoErr(e1)
|
|
580
580
|
}
|
|
@@ -586,7 +586,7 @@ func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tok
|
|
|
586
586
|
if disableAllPrivileges {
|
|
587
587
|
_p0 = 1
|
|
588
588
|
}
|
|
589
|
-
r1, _, e1 := syscall.
|
|
589
|
+
r1, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
|
|
590
590
|
if r1 == 0 {
|
|
591
591
|
err = errnoErr(e1)
|
|
592
592
|
}
|
|
@@ -594,7 +594,7 @@ func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tok
|
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
|
|
597
|
-
r1, _, e1 := syscall.
|
|
597
|
+
r1, _, e1 := syscall.SyscallN(procAllocateAndInitializeSid.Addr(), uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)))
|
|
598
598
|
if r1 == 0 {
|
|
599
599
|
err = errnoErr(e1)
|
|
600
600
|
}
|
|
@@ -602,7 +602,7 @@ func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, s
|
|
|
602
602
|
}
|
|
603
603
|
|
|
604
604
|
func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
|
|
605
|
-
r0, _, _ := syscall.
|
|
605
|
+
r0, _, _ := syscall.SyscallN(procBuildSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
|
|
606
606
|
if r0 != 0 {
|
|
607
607
|
ret = syscall.Errno(r0)
|
|
608
608
|
}
|
|
@@ -610,7 +610,7 @@ func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
|
|
613
|
-
r1, _, e1 := syscall.
|
|
613
|
+
r1, _, e1 := syscall.SyscallN(procChangeServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
|
|
614
614
|
if r1 == 0 {
|
|
615
615
|
err = errnoErr(e1)
|
|
616
616
|
}
|
|
@@ -618,7 +618,7 @@ func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err err
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
|
|
621
|
-
r1, _, e1 := syscall.
|
|
621
|
+
r1, _, e1 := syscall.SyscallN(procChangeServiceConfigW.Addr(), uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)))
|
|
622
622
|
if r1 == 0 {
|
|
623
623
|
err = errnoErr(e1)
|
|
624
624
|
}
|
|
@@ -626,7 +626,7 @@ func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, e
|
|
|
626
626
|
}
|
|
627
627
|
|
|
628
628
|
func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
|
|
629
|
-
r1, _, e1 := syscall.
|
|
629
|
+
r1, _, e1 := syscall.SyscallN(procCheckTokenMembership.Addr(), uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
|
|
630
630
|
if r1 == 0 {
|
|
631
631
|
err = errnoErr(e1)
|
|
632
632
|
}
|
|
@@ -634,7 +634,7 @@ func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (
|
|
|
634
634
|
}
|
|
635
635
|
|
|
636
636
|
func CloseServiceHandle(handle Handle) (err error) {
|
|
637
|
-
r1, _, e1 := syscall.
|
|
637
|
+
r1, _, e1 := syscall.SyscallN(procCloseServiceHandle.Addr(), uintptr(handle))
|
|
638
638
|
if r1 == 0 {
|
|
639
639
|
err = errnoErr(e1)
|
|
640
640
|
}
|
|
@@ -642,7 +642,7 @@ func CloseServiceHandle(handle Handle) (err error) {
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
|
|
645
|
-
r1, _, e1 := syscall.
|
|
645
|
+
r1, _, e1 := syscall.SyscallN(procControlService.Addr(), uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
|
|
646
646
|
if r1 == 0 {
|
|
647
647
|
err = errnoErr(e1)
|
|
648
648
|
}
|
|
@@ -650,7 +650,7 @@ func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err
|
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
|
|
653
|
-
r1, _, e1 := syscall.
|
|
653
|
+
r1, _, e1 := syscall.SyscallN(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)))
|
|
654
654
|
if r1 == 0 {
|
|
655
655
|
err = errnoErr(e1)
|
|
656
656
|
}
|
|
@@ -658,7 +658,7 @@ func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR
|
|
|
658
658
|
}
|
|
659
659
|
|
|
660
660
|
func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
|
|
661
|
-
r1, _, e1 := syscall.
|
|
661
|
+
r1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)))
|
|
662
662
|
if r1 == 0 {
|
|
663
663
|
err = errnoErr(e1)
|
|
664
664
|
}
|
|
@@ -675,7 +675,7 @@ func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision ui
|
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
|
|
678
|
-
r1, _, e1 := syscall.
|
|
678
|
+
r1, _, e1 := syscall.SyscallN(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)))
|
|
679
679
|
if r1 == 0 {
|
|
680
680
|
err = errnoErr(e1)
|
|
681
681
|
}
|
|
@@ -683,7 +683,7 @@ func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision
|
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
|
|
686
|
-
r1, _, e1 := syscall.
|
|
686
|
+
r1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)))
|
|
687
687
|
if r1 == 0 {
|
|
688
688
|
err = errnoErr(e1)
|
|
689
689
|
}
|
|
@@ -691,7 +691,7 @@ func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
|
|
|
691
691
|
}
|
|
692
692
|
|
|
693
693
|
func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
|
|
694
|
-
r1, _, e1 := syscall.
|
|
694
|
+
r1, _, e1 := syscall.SyscallN(procCopySid.Addr(), uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
|
|
695
695
|
if r1 == 0 {
|
|
696
696
|
err = errnoErr(e1)
|
|
697
697
|
}
|
|
@@ -703,7 +703,7 @@ func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, proc
|
|
|
703
703
|
if inheritHandles {
|
|
704
704
|
_p0 = 1
|
|
705
705
|
}
|
|
706
|
-
r1, _, e1 := syscall.
|
|
706
|
+
r1, _, e1 := syscall.SyscallN(procCreateProcessAsUserW.Addr(), uintptr(token), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)))
|
|
707
707
|
if r1 == 0 {
|
|
708
708
|
err = errnoErr(e1)
|
|
709
709
|
}
|
|
@@ -711,7 +711,7 @@ func CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, proc
|
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) {
|
|
714
|
-
r0, _, e1 := syscall.
|
|
714
|
+
r0, _, e1 := syscall.SyscallN(procCreateServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)))
|
|
715
715
|
handle = Handle(r0)
|
|
716
716
|
if handle == 0 {
|
|
717
717
|
err = errnoErr(e1)
|
|
@@ -720,7 +720,7 @@ func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access
|
|
|
720
720
|
}
|
|
721
721
|
|
|
722
722
|
func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {
|
|
723
|
-
r1, _, e1 := syscall.
|
|
723
|
+
r1, _, e1 := syscall.SyscallN(procCreateWellKnownSid.Addr(), uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)))
|
|
724
724
|
if r1 == 0 {
|
|
725
725
|
err = errnoErr(e1)
|
|
726
726
|
}
|
|
@@ -728,7 +728,7 @@ func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, s
|
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
|
|
731
|
-
r1, _, e1 := syscall.
|
|
731
|
+
r1, _, e1 := syscall.SyscallN(procCryptAcquireContextW.Addr(), uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags))
|
|
732
732
|
if r1 == 0 {
|
|
733
733
|
err = errnoErr(e1)
|
|
734
734
|
}
|
|
@@ -736,7 +736,7 @@ func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16
|
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
|
|
739
|
-
r1, _, e1 := syscall.
|
|
739
|
+
r1, _, e1 := syscall.SyscallN(procCryptGenRandom.Addr(), uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
|
|
740
740
|
if r1 == 0 {
|
|
741
741
|
err = errnoErr(e1)
|
|
742
742
|
}
|
|
@@ -744,7 +744,7 @@ func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
|
|
|
744
744
|
}
|
|
745
745
|
|
|
746
746
|
func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
|
|
747
|
-
r1, _, e1 := syscall.
|
|
747
|
+
r1, _, e1 := syscall.SyscallN(procCryptReleaseContext.Addr(), uintptr(provhandle), uintptr(flags))
|
|
748
748
|
if r1 == 0 {
|
|
749
749
|
err = errnoErr(e1)
|
|
750
750
|
}
|
|
@@ -752,7 +752,7 @@ func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
|
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
func DeleteService(service Handle) (err error) {
|
|
755
|
-
r1, _, e1 := syscall.
|
|
755
|
+
r1, _, e1 := syscall.SyscallN(procDeleteService.Addr(), uintptr(service))
|
|
756
756
|
if r1 == 0 {
|
|
757
757
|
err = errnoErr(e1)
|
|
758
758
|
}
|
|
@@ -760,7 +760,7 @@ func DeleteService(service Handle) (err error) {
|
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
func DeregisterEventSource(handle Handle) (err error) {
|
|
763
|
-
r1, _, e1 := syscall.
|
|
763
|
+
r1, _, e1 := syscall.SyscallN(procDeregisterEventSource.Addr(), uintptr(handle))
|
|
764
764
|
if r1 == 0 {
|
|
765
765
|
err = errnoErr(e1)
|
|
766
766
|
}
|
|
@@ -768,7 +768,7 @@ func DeregisterEventSource(handle Handle) (err error) {
|
|
|
768
768
|
}
|
|
769
769
|
|
|
770
770
|
func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {
|
|
771
|
-
r1, _, e1 := syscall.
|
|
771
|
+
r1, _, e1 := syscall.SyscallN(procDuplicateTokenEx.Addr(), uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
|
|
772
772
|
if r1 == 0 {
|
|
773
773
|
err = errnoErr(e1)
|
|
774
774
|
}
|
|
@@ -776,7 +776,7 @@ func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes
|
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) {
|
|
779
|
-
r1, _, e1 := syscall.
|
|
779
|
+
r1, _, e1 := syscall.SyscallN(procEnumDependentServicesW.Addr(), uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)))
|
|
780
780
|
if r1 == 0 {
|
|
781
781
|
err = errnoErr(e1)
|
|
782
782
|
}
|
|
@@ -784,7 +784,7 @@ func EnumDependentServices(service Handle, activityState uint32, services *ENUM_
|
|
|
784
784
|
}
|
|
785
785
|
|
|
786
786
|
func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
|
|
787
|
-
r1, _, e1 := syscall.
|
|
787
|
+
r1, _, e1 := syscall.SyscallN(procEnumServicesStatusExW.Addr(), uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)))
|
|
788
788
|
if r1 == 0 {
|
|
789
789
|
err = errnoErr(e1)
|
|
790
790
|
}
|
|
@@ -792,13 +792,13 @@ func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serv
|
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
|
|
795
|
-
r0, _, _ := syscall.
|
|
795
|
+
r0, _, _ := syscall.SyscallN(procEqualSid.Addr(), uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)))
|
|
796
796
|
isEqual = r0 != 0
|
|
797
797
|
return
|
|
798
798
|
}
|
|
799
799
|
|
|
800
800
|
func FreeSid(sid *SID) (err error) {
|
|
801
|
-
r1, _, e1 := syscall.
|
|
801
|
+
r1, _, e1 := syscall.SyscallN(procFreeSid.Addr(), uintptr(unsafe.Pointer(sid)))
|
|
802
802
|
if r1 != 0 {
|
|
803
803
|
err = errnoErr(e1)
|
|
804
804
|
}
|
|
@@ -806,7 +806,7 @@ func FreeSid(sid *SID) (err error) {
|
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) {
|
|
809
|
-
r1, _, e1 := syscall.
|
|
809
|
+
r1, _, e1 := syscall.SyscallN(procGetAce.Addr(), uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce)))
|
|
810
810
|
if r1 == 0 {
|
|
811
811
|
err = errnoErr(e1)
|
|
812
812
|
}
|
|
@@ -814,7 +814,7 @@ func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) {
|
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
func GetLengthSid(sid *SID) (len uint32) {
|
|
817
|
-
r0, _, _ := syscall.
|
|
817
|
+
r0, _, _ := syscall.SyscallN(procGetLengthSid.Addr(), uintptr(unsafe.Pointer(sid)))
|
|
818
818
|
len = uint32(r0)
|
|
819
819
|
return
|
|
820
820
|
}
|
|
@@ -829,7 +829,7 @@ func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, security
|
|
|
829
829
|
}
|
|
830
830
|
|
|
831
831
|
func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
|
|
832
|
-
r0, _, _ := syscall.
|
|
832
|
+
r0, _, _ := syscall.SyscallN(procGetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)))
|
|
833
833
|
if r0 != 0 {
|
|
834
834
|
ret = syscall.Errno(r0)
|
|
835
835
|
}
|
|
@@ -837,7 +837,7 @@ func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securi
|
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
|
|
840
|
-
r1, _, e1 := syscall.
|
|
840
|
+
r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
|
|
841
841
|
if r1 == 0 {
|
|
842
842
|
err = errnoErr(e1)
|
|
843
843
|
}
|
|
@@ -853,7 +853,7 @@ func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl
|
|
|
853
853
|
if *daclDefaulted {
|
|
854
854
|
_p1 = 1
|
|
855
855
|
}
|
|
856
|
-
r1, _, e1 := syscall.
|
|
856
|
+
r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)))
|
|
857
857
|
*daclPresent = _p0 != 0
|
|
858
858
|
*daclDefaulted = _p1 != 0
|
|
859
859
|
if r1 == 0 {
|
|
@@ -867,7 +867,7 @@ func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefau
|
|
|
867
867
|
if *groupDefaulted {
|
|
868
868
|
_p0 = 1
|
|
869
869
|
}
|
|
870
|
-
r1, _, e1 := syscall.
|
|
870
|
+
r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
|
|
871
871
|
*groupDefaulted = _p0 != 0
|
|
872
872
|
if r1 == 0 {
|
|
873
873
|
err = errnoErr(e1)
|
|
@@ -876,7 +876,7 @@ func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefau
|
|
|
876
876
|
}
|
|
877
877
|
|
|
878
878
|
func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
|
|
879
|
-
r0, _, _ := syscall.
|
|
879
|
+
r0, _, _ := syscall.SyscallN(procGetSecurityDescriptorLength.Addr(), uintptr(unsafe.Pointer(sd)))
|
|
880
880
|
len = uint32(r0)
|
|
881
881
|
return
|
|
882
882
|
}
|
|
@@ -886,7 +886,7 @@ func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefau
|
|
|
886
886
|
if *ownerDefaulted {
|
|
887
887
|
_p0 = 1
|
|
888
888
|
}
|
|
889
|
-
r1, _, e1 := syscall.
|
|
889
|
+
r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
|
|
890
890
|
*ownerDefaulted = _p0 != 0
|
|
891
891
|
if r1 == 0 {
|
|
892
892
|
err = errnoErr(e1)
|
|
@@ -895,7 +895,7 @@ func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefau
|
|
|
895
895
|
}
|
|
896
896
|
|
|
897
897
|
func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
|
|
898
|
-
r0, _, _ := syscall.
|
|
898
|
+
r0, _, _ := syscall.SyscallN(procGetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)))
|
|
899
899
|
if r0 != 0 {
|
|
900
900
|
ret = syscall.Errno(r0)
|
|
901
901
|
}
|
|
@@ -911,7 +911,7 @@ func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl
|
|
|
911
911
|
if *saclDefaulted {
|
|
912
912
|
_p1 = 1
|
|
913
913
|
}
|
|
914
|
-
r1, _, e1 := syscall.
|
|
914
|
+
r1, _, e1 := syscall.SyscallN(procGetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)))
|
|
915
915
|
*saclPresent = _p0 != 0
|
|
916
916
|
*saclDefaulted = _p1 != 0
|
|
917
917
|
if r1 == 0 {
|
|
@@ -921,7 +921,7 @@ func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl
|
|
|
921
921
|
}
|
|
922
922
|
|
|
923
923
|
func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
|
|
924
|
-
r0, _, _ := syscall.
|
|
924
|
+
r0, _, _ := syscall.SyscallN(procGetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)))
|
|
925
925
|
if r0 != 0 {
|
|
926
926
|
ret = syscall.Errno(r0)
|
|
927
927
|
}
|
|
@@ -929,25 +929,25 @@ func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati
|
|
|
929
929
|
}
|
|
930
930
|
|
|
931
931
|
func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {
|
|
932
|
-
r0, _, _ := syscall.
|
|
932
|
+
r0, _, _ := syscall.SyscallN(procGetSidIdentifierAuthority.Addr(), uintptr(unsafe.Pointer(sid)))
|
|
933
933
|
authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))
|
|
934
934
|
return
|
|
935
935
|
}
|
|
936
936
|
|
|
937
937
|
func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {
|
|
938
|
-
r0, _, _ := syscall.
|
|
938
|
+
r0, _, _ := syscall.SyscallN(procGetSidSubAuthority.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(index))
|
|
939
939
|
subAuthority = (*uint32)(unsafe.Pointer(r0))
|
|
940
940
|
return
|
|
941
941
|
}
|
|
942
942
|
|
|
943
943
|
func getSidSubAuthorityCount(sid *SID) (count *uint8) {
|
|
944
|
-
r0, _, _ := syscall.
|
|
944
|
+
r0, _, _ := syscall.SyscallN(procGetSidSubAuthorityCount.Addr(), uintptr(unsafe.Pointer(sid)))
|
|
945
945
|
count = (*uint8)(unsafe.Pointer(r0))
|
|
946
946
|
return
|
|
947
947
|
}
|
|
948
948
|
|
|
949
949
|
func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
|
|
950
|
-
r1, _, e1 := syscall.
|
|
950
|
+
r1, _, e1 := syscall.SyscallN(procGetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)))
|
|
951
951
|
if r1 == 0 {
|
|
952
952
|
err = errnoErr(e1)
|
|
953
953
|
}
|
|
@@ -955,7 +955,7 @@ func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint
|
|
|
955
955
|
}
|
|
956
956
|
|
|
957
957
|
func ImpersonateSelf(impersonationlevel uint32) (err error) {
|
|
958
|
-
r1, _, e1 := syscall.
|
|
958
|
+
r1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(impersonationlevel))
|
|
959
959
|
if r1 == 0 {
|
|
960
960
|
err = errnoErr(e1)
|
|
961
961
|
}
|
|
@@ -963,7 +963,7 @@ func ImpersonateSelf(impersonationlevel uint32) (err error) {
|
|
|
963
963
|
}
|
|
964
964
|
|
|
965
965
|
func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
|
|
966
|
-
r1, _, e1 := syscall.
|
|
966
|
+
r1, _, e1 := syscall.SyscallN(procInitializeSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision))
|
|
967
967
|
if r1 == 0 {
|
|
968
968
|
err = errnoErr(e1)
|
|
969
969
|
}
|
|
@@ -979,7 +979,7 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint
|
|
|
979
979
|
if rebootAfterShutdown {
|
|
980
980
|
_p1 = 1
|
|
981
981
|
}
|
|
982
|
-
r1, _, e1 := syscall.
|
|
982
|
+
r1, _, e1 := syscall.SyscallN(procInitiateSystemShutdownExW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
|
|
983
983
|
if r1 == 0 {
|
|
984
984
|
err = errnoErr(e1)
|
|
985
985
|
}
|
|
@@ -987,7 +987,7 @@ func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint
|
|
|
987
987
|
}
|
|
988
988
|
|
|
989
989
|
func isTokenRestricted(tokenHandle Token) (ret bool, err error) {
|
|
990
|
-
r0, _, e1 := syscall.
|
|
990
|
+
r0, _, e1 := syscall.SyscallN(procIsTokenRestricted.Addr(), uintptr(tokenHandle))
|
|
991
991
|
ret = r0 != 0
|
|
992
992
|
if !ret {
|
|
993
993
|
err = errnoErr(e1)
|
|
@@ -996,25 +996,25 @@ func isTokenRestricted(tokenHandle Token) (ret bool, err error) {
|
|
|
996
996
|
}
|
|
997
997
|
|
|
998
998
|
func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
|
|
999
|
-
r0, _, _ := syscall.
|
|
999
|
+
r0, _, _ := syscall.SyscallN(procIsValidSecurityDescriptor.Addr(), uintptr(unsafe.Pointer(sd)))
|
|
1000
1000
|
isValid = r0 != 0
|
|
1001
1001
|
return
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
1004
|
func isValidSid(sid *SID) (isValid bool) {
|
|
1005
|
-
r0, _, _ := syscall.
|
|
1005
|
+
r0, _, _ := syscall.SyscallN(procIsValidSid.Addr(), uintptr(unsafe.Pointer(sid)))
|
|
1006
1006
|
isValid = r0 != 0
|
|
1007
1007
|
return
|
|
1008
1008
|
}
|
|
1009
1009
|
|
|
1010
1010
|
func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {
|
|
1011
|
-
r0, _, _ := syscall.
|
|
1011
|
+
r0, _, _ := syscall.SyscallN(procIsWellKnownSid.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(sidType))
|
|
1012
1012
|
isWellKnown = r0 != 0
|
|
1013
1013
|
return
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
1016
1016
|
func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
|
|
1017
|
-
r1, _, e1 := syscall.
|
|
1017
|
+
r1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)))
|
|
1018
1018
|
if r1 == 0 {
|
|
1019
1019
|
err = errnoErr(e1)
|
|
1020
1020
|
}
|
|
@@ -1022,7 +1022,7 @@ func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen
|
|
|
1022
1022
|
}
|
|
1023
1023
|
|
|
1024
1024
|
func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
|
|
1025
|
-
r1, _, e1 := syscall.
|
|
1025
|
+
r1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)))
|
|
1026
1026
|
if r1 == 0 {
|
|
1027
1027
|
err = errnoErr(e1)
|
|
1028
1028
|
}
|
|
@@ -1030,7 +1030,7 @@ func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint3
|
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
1032
|
func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {
|
|
1033
|
-
r1, _, e1 := syscall.
|
|
1033
|
+
r1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
|
|
1034
1034
|
if r1 == 0 {
|
|
1035
1035
|
err = errnoErr(e1)
|
|
1036
1036
|
}
|
|
@@ -1038,7 +1038,7 @@ func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err err
|
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
1040
|
func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
|
|
1041
|
-
r1, _, e1 := syscall.
|
|
1041
|
+
r1, _, e1 := syscall.SyscallN(procMakeAbsoluteSD.Addr(), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)))
|
|
1042
1042
|
if r1 == 0 {
|
|
1043
1043
|
err = errnoErr(e1)
|
|
1044
1044
|
}
|
|
@@ -1046,7 +1046,7 @@ func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DE
|
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
1048
|
func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
|
|
1049
|
-
r1, _, e1 := syscall.
|
|
1049
|
+
r1, _, e1 := syscall.SyscallN(procMakeSelfRelativeSD.Addr(), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
|
|
1050
1050
|
if r1 == 0 {
|
|
1051
1051
|
err = errnoErr(e1)
|
|
1052
1052
|
}
|
|
@@ -1054,7 +1054,7 @@ func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURIT
|
|
|
1054
1054
|
}
|
|
1055
1055
|
|
|
1056
1056
|
func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) {
|
|
1057
|
-
r0, _, _ := syscall.
|
|
1057
|
+
r0, _, _ := syscall.SyscallN(procNotifyServiceStatusChangeW.Addr(), uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier)))
|
|
1058
1058
|
if r0 != 0 {
|
|
1059
1059
|
ret = syscall.Errno(r0)
|
|
1060
1060
|
}
|
|
@@ -1062,7 +1062,7 @@ func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERV
|
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
1064
|
func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
|
|
1065
|
-
r1, _, e1 := syscall.
|
|
1065
|
+
r1, _, e1 := syscall.SyscallN(procOpenProcessToken.Addr(), uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
|
|
1066
1066
|
if r1 == 0 {
|
|
1067
1067
|
err = errnoErr(e1)
|
|
1068
1068
|
}
|
|
@@ -1070,7 +1070,7 @@ func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
1072
|
func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
|
|
1073
|
-
r0, _, e1 := syscall.
|
|
1073
|
+
r0, _, e1 := syscall.SyscallN(procOpenSCManagerW.Addr(), uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
|
|
1074
1074
|
handle = Handle(r0)
|
|
1075
1075
|
if handle == 0 {
|
|
1076
1076
|
err = errnoErr(e1)
|
|
@@ -1079,7 +1079,7 @@ func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (ha
|
|
|
1079
1079
|
}
|
|
1080
1080
|
|
|
1081
1081
|
func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
|
|
1082
|
-
r0, _, e1 := syscall.
|
|
1082
|
+
r0, _, e1 := syscall.SyscallN(procOpenServiceW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
|
|
1083
1083
|
handle = Handle(r0)
|
|
1084
1084
|
if handle == 0 {
|
|
1085
1085
|
err = errnoErr(e1)
|
|
@@ -1092,7 +1092,7 @@ func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token
|
|
|
1092
1092
|
if openAsSelf {
|
|
1093
1093
|
_p0 = 1
|
|
1094
1094
|
}
|
|
1095
|
-
r1, _, e1 := syscall.
|
|
1095
|
+
r1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)))
|
|
1096
1096
|
if r1 == 0 {
|
|
1097
1097
|
err = errnoErr(e1)
|
|
1098
1098
|
}
|
|
@@ -1100,7 +1100,7 @@ func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token
|
|
|
1100
1100
|
}
|
|
1101
1101
|
|
|
1102
1102
|
func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
|
|
1103
|
-
r1, _, e1 := syscall.
|
|
1103
|
+
r1, _, e1 := syscall.SyscallN(procQueryServiceConfig2W.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)))
|
|
1104
1104
|
if r1 == 0 {
|
|
1105
1105
|
err = errnoErr(e1)
|
|
1106
1106
|
}
|
|
@@ -1108,7 +1108,7 @@ func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize
|
|
|
1108
1108
|
}
|
|
1109
1109
|
|
|
1110
1110
|
func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
|
|
1111
|
-
r1, _, e1 := syscall.
|
|
1111
|
+
r1, _, e1 := syscall.SyscallN(procQueryServiceConfigW.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)))
|
|
1112
1112
|
if r1 == 0 {
|
|
1113
1113
|
err = errnoErr(e1)
|
|
1114
1114
|
}
|
|
@@ -1120,7 +1120,7 @@ func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInf
|
|
|
1120
1120
|
if err != nil {
|
|
1121
1121
|
return
|
|
1122
1122
|
}
|
|
1123
|
-
r1, _, e1 := syscall.
|
|
1123
|
+
r1, _, e1 := syscall.SyscallN(procQueryServiceDynamicInformation.Addr(), uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
|
|
1124
1124
|
if r1 == 0 {
|
|
1125
1125
|
err = errnoErr(e1)
|
|
1126
1126
|
}
|
|
@@ -1128,7 +1128,7 @@ func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInf
|
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
1130
1130
|
func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
|
|
1131
|
-
r1, _, e1 := syscall.
|
|
1131
|
+
r1, _, e1 := syscall.SyscallN(procQueryServiceLockStatusW.Addr(), uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)))
|
|
1132
1132
|
if r1 == 0 {
|
|
1133
1133
|
err = errnoErr(e1)
|
|
1134
1134
|
}
|
|
@@ -1136,7 +1136,7 @@ func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, b
|
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
1138
|
func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
|
|
1139
|
-
r1, _, e1 := syscall.
|
|
1139
|
+
r1, _, e1 := syscall.SyscallN(procQueryServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(status)))
|
|
1140
1140
|
if r1 == 0 {
|
|
1141
1141
|
err = errnoErr(e1)
|
|
1142
1142
|
}
|
|
@@ -1144,7 +1144,7 @@ func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
1146
|
func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
|
|
1147
|
-
r1, _, e1 := syscall.
|
|
1147
|
+
r1, _, e1 := syscall.SyscallN(procQueryServiceStatusEx.Addr(), uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)))
|
|
1148
1148
|
if r1 == 0 {
|
|
1149
1149
|
err = errnoErr(e1)
|
|
1150
1150
|
}
|
|
@@ -1152,7 +1152,7 @@ func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize
|
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
1154
|
func RegCloseKey(key Handle) (regerrno error) {
|
|
1155
|
-
r0, _, _ := syscall.
|
|
1155
|
+
r0, _, _ := syscall.SyscallN(procRegCloseKey.Addr(), uintptr(key))
|
|
1156
1156
|
if r0 != 0 {
|
|
1157
1157
|
regerrno = syscall.Errno(r0)
|
|
1158
1158
|
}
|
|
@@ -1160,7 +1160,7 @@ func RegCloseKey(key Handle) (regerrno error) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
1162
|
func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
|
|
1163
|
-
r0, _, _ := syscall.
|
|
1163
|
+
r0, _, _ := syscall.SyscallN(procRegEnumKeyExW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)))
|
|
1164
1164
|
if r0 != 0 {
|
|
1165
1165
|
regerrno = syscall.Errno(r0)
|
|
1166
1166
|
}
|
|
@@ -1176,7 +1176,7 @@ func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32,
|
|
|
1176
1176
|
if asynchronous {
|
|
1177
1177
|
_p1 = 1
|
|
1178
1178
|
}
|
|
1179
|
-
r0, _, _ := syscall.
|
|
1179
|
+
r0, _, _ := syscall.SyscallN(procRegNotifyChangeKeyValue.Addr(), uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1))
|
|
1180
1180
|
if r0 != 0 {
|
|
1181
1181
|
regerrno = syscall.Errno(r0)
|
|
1182
1182
|
}
|
|
@@ -1184,7 +1184,7 @@ func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32,
|
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
1186
|
func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
|
|
1187
|
-
r0, _, _ := syscall.
|
|
1187
|
+
r0, _, _ := syscall.SyscallN(procRegOpenKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)))
|
|
1188
1188
|
if r0 != 0 {
|
|
1189
1189
|
regerrno = syscall.Errno(r0)
|
|
1190
1190
|
}
|
|
@@ -1192,7 +1192,7 @@ func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint
|
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
|
|
1195
|
-
r0, _, _ := syscall.
|
|
1195
|
+
r0, _, _ := syscall.SyscallN(procRegQueryInfoKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
|
|
1196
1196
|
if r0 != 0 {
|
|
1197
1197
|
regerrno = syscall.Errno(r0)
|
|
1198
1198
|
}
|
|
@@ -1200,7 +1200,7 @@ func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint
|
|
|
1200
1200
|
}
|
|
1201
1201
|
|
|
1202
1202
|
func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
|
|
1203
|
-
r0, _, _ := syscall.
|
|
1203
|
+
r0, _, _ := syscall.SyscallN(procRegQueryValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
|
|
1204
1204
|
if r0 != 0 {
|
|
1205
1205
|
regerrno = syscall.Errno(r0)
|
|
1206
1206
|
}
|
|
@@ -1208,7 +1208,7 @@ func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32
|
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
1210
1210
|
func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
|
|
1211
|
-
r0, _, e1 := syscall.
|
|
1211
|
+
r0, _, e1 := syscall.SyscallN(procRegisterEventSourceW.Addr(), uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)))
|
|
1212
1212
|
handle = Handle(r0)
|
|
1213
1213
|
if handle == 0 {
|
|
1214
1214
|
err = errnoErr(e1)
|
|
@@ -1217,7 +1217,7 @@ func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Hand
|
|
|
1217
1217
|
}
|
|
1218
1218
|
|
|
1219
1219
|
func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {
|
|
1220
|
-
r0, _, e1 := syscall.
|
|
1220
|
+
r0, _, e1 := syscall.SyscallN(procRegisterServiceCtrlHandlerExW.Addr(), uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
|
|
1221
1221
|
handle = Handle(r0)
|
|
1222
1222
|
if handle == 0 {
|
|
1223
1223
|
err = errnoErr(e1)
|
|
@@ -1226,7 +1226,7 @@ func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, cont
|
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
|
|
1229
|
-
r1, _, e1 := syscall.
|
|
1229
|
+
r1, _, e1 := syscall.SyscallN(procReportEventW.Addr(), uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
|
|
1230
1230
|
if r1 == 0 {
|
|
1231
1231
|
err = errnoErr(e1)
|
|
1232
1232
|
}
|
|
@@ -1234,7 +1234,7 @@ func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrS
|
|
|
1234
1234
|
}
|
|
1235
1235
|
|
|
1236
1236
|
func RevertToSelf() (err error) {
|
|
1237
|
-
r1, _, e1 := syscall.
|
|
1237
|
+
r1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr())
|
|
1238
1238
|
if r1 == 0 {
|
|
1239
1239
|
err = errnoErr(e1)
|
|
1240
1240
|
}
|
|
@@ -1242,7 +1242,7 @@ func RevertToSelf() (err error) {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
|
|
1244
1244
|
func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
|
|
1245
|
-
r0, _, _ := syscall.
|
|
1245
|
+
r0, _, _ := syscall.SyscallN(procSetEntriesInAclW.Addr(), uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)))
|
|
1246
1246
|
if r0 != 0 {
|
|
1247
1247
|
ret = syscall.Errno(r0)
|
|
1248
1248
|
}
|
|
@@ -1250,7 +1250,7 @@ func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCE
|
|
|
1250
1250
|
}
|
|
1251
1251
|
|
|
1252
1252
|
func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {
|
|
1253
|
-
r1, _, e1 := syscall.
|
|
1253
|
+
r1, _, e1 := syscall.SyscallN(procSetKernelObjectSecurity.Addr(), uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
|
|
1254
1254
|
if r1 == 0 {
|
|
1255
1255
|
err = errnoErr(e1)
|
|
1256
1256
|
}
|
|
@@ -1267,7 +1267,7 @@ func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, security
|
|
|
1267
1267
|
}
|
|
1268
1268
|
|
|
1269
1269
|
func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
|
|
1270
|
-
r0, _, _ := syscall.
|
|
1270
|
+
r0, _, _ := syscall.SyscallN(procSetNamedSecurityInfoW.Addr(), uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)))
|
|
1271
1271
|
if r0 != 0 {
|
|
1272
1272
|
ret = syscall.Errno(r0)
|
|
1273
1273
|
}
|
|
@@ -1275,7 +1275,7 @@ func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securi
|
|
|
1275
1275
|
}
|
|
1276
1276
|
|
|
1277
1277
|
func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
|
|
1278
|
-
r1, _, e1 := syscall.
|
|
1278
|
+
r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
|
|
1279
1279
|
if r1 == 0 {
|
|
1280
1280
|
err = errnoErr(e1)
|
|
1281
1281
|
}
|
|
@@ -1291,7 +1291,7 @@ func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *
|
|
|
1291
1291
|
if daclDefaulted {
|
|
1292
1292
|
_p1 = 1
|
|
1293
1293
|
}
|
|
1294
|
-
r1, _, e1 := syscall.
|
|
1294
|
+
r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorDacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1))
|
|
1295
1295
|
if r1 == 0 {
|
|
1296
1296
|
err = errnoErr(e1)
|
|
1297
1297
|
}
|
|
@@ -1303,7 +1303,7 @@ func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaul
|
|
|
1303
1303
|
if groupDefaulted {
|
|
1304
1304
|
_p0 = 1
|
|
1305
1305
|
}
|
|
1306
|
-
r1, _, e1 := syscall.
|
|
1306
|
+
r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorGroup.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
|
|
1307
1307
|
if r1 == 0 {
|
|
1308
1308
|
err = errnoErr(e1)
|
|
1309
1309
|
}
|
|
@@ -1315,7 +1315,7 @@ func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaul
|
|
|
1315
1315
|
if ownerDefaulted {
|
|
1316
1316
|
_p0 = 1
|
|
1317
1317
|
}
|
|
1318
|
-
r1, _, e1 := syscall.
|
|
1318
|
+
r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorOwner.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
|
|
1319
1319
|
if r1 == 0 {
|
|
1320
1320
|
err = errnoErr(e1)
|
|
1321
1321
|
}
|
|
@@ -1323,7 +1323,7 @@ func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaul
|
|
|
1323
1323
|
}
|
|
1324
1324
|
|
|
1325
1325
|
func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
|
|
1326
|
-
syscall.
|
|
1326
|
+
syscall.SyscallN(procSetSecurityDescriptorRMControl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)))
|
|
1327
1327
|
return
|
|
1328
1328
|
}
|
|
1329
1329
|
|
|
@@ -1336,7 +1336,7 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *
|
|
|
1336
1336
|
if saclDefaulted {
|
|
1337
1337
|
_p1 = 1
|
|
1338
1338
|
}
|
|
1339
|
-
r1, _, e1 := syscall.
|
|
1339
|
+
r1, _, e1 := syscall.SyscallN(procSetSecurityDescriptorSacl.Addr(), uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1))
|
|
1340
1340
|
if r1 == 0 {
|
|
1341
1341
|
err = errnoErr(e1)
|
|
1342
1342
|
}
|
|
@@ -1344,7 +1344,7 @@ func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *
|
|
|
1344
1344
|
}
|
|
1345
1345
|
|
|
1346
1346
|
func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
|
|
1347
|
-
r0, _, _ := syscall.
|
|
1347
|
+
r0, _, _ := syscall.SyscallN(procSetSecurityInfo.Addr(), uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)))
|
|
1348
1348
|
if r0 != 0 {
|
|
1349
1349
|
ret = syscall.Errno(r0)
|
|
1350
1350
|
}
|
|
@@ -1352,7 +1352,7 @@ func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformati
|
|
|
1352
1352
|
}
|
|
1353
1353
|
|
|
1354
1354
|
func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
|
|
1355
|
-
r1, _, e1 := syscall.
|
|
1355
|
+
r1, _, e1 := syscall.SyscallN(procSetServiceStatus.Addr(), uintptr(service), uintptr(unsafe.Pointer(serviceStatus)))
|
|
1356
1356
|
if r1 == 0 {
|
|
1357
1357
|
err = errnoErr(e1)
|
|
1358
1358
|
}
|
|
@@ -1360,7 +1360,7 @@ func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error)
|
|
|
1360
1360
|
}
|
|
1361
1361
|
|
|
1362
1362
|
func SetThreadToken(thread *Handle, token Token) (err error) {
|
|
1363
|
-
r1, _, e1 := syscall.
|
|
1363
|
+
r1, _, e1 := syscall.SyscallN(procSetThreadToken.Addr(), uintptr(unsafe.Pointer(thread)), uintptr(token))
|
|
1364
1364
|
if r1 == 0 {
|
|
1365
1365
|
err = errnoErr(e1)
|
|
1366
1366
|
}
|
|
@@ -1368,7 +1368,7 @@ func SetThreadToken(thread *Handle, token Token) (err error) {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
|
|
1370
1370
|
func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {
|
|
1371
|
-
r1, _, e1 := syscall.
|
|
1371
|
+
r1, _, e1 := syscall.SyscallN(procSetTokenInformation.Addr(), uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen))
|
|
1372
1372
|
if r1 == 0 {
|
|
1373
1373
|
err = errnoErr(e1)
|
|
1374
1374
|
}
|
|
@@ -1376,7 +1376,7 @@ func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint
|
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
1378
|
func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
|
|
1379
|
-
r1, _, e1 := syscall.
|
|
1379
|
+
r1, _, e1 := syscall.SyscallN(procStartServiceCtrlDispatcherW.Addr(), uintptr(unsafe.Pointer(serviceTable)))
|
|
1380
1380
|
if r1 == 0 {
|
|
1381
1381
|
err = errnoErr(e1)
|
|
1382
1382
|
}
|
|
@@ -1384,7 +1384,7 @@ func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
|
|
|
1384
1384
|
}
|
|
1385
1385
|
|
|
1386
1386
|
func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
|
|
1387
|
-
r1, _, e1 := syscall.
|
|
1387
|
+
r1, _, e1 := syscall.SyscallN(procStartServiceW.Addr(), uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
|
|
1388
1388
|
if r1 == 0 {
|
|
1389
1389
|
err = errnoErr(e1)
|
|
1390
1390
|
}
|
|
@@ -1392,7 +1392,7 @@ func StartService(service Handle, numArgs uint32, argVectors **uint16) (err erro
|
|
|
1392
1392
|
}
|
|
1393
1393
|
|
|
1394
1394
|
func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
|
|
1395
|
-
r1, _, e1 := syscall.
|
|
1395
|
+
r1, _, e1 := syscall.SyscallN(procCertAddCertificateContextToStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)))
|
|
1396
1396
|
if r1 == 0 {
|
|
1397
1397
|
err = errnoErr(e1)
|
|
1398
1398
|
}
|
|
@@ -1400,7 +1400,7 @@ func CertAddCertificateContextToStore(store Handle, certContext *CertContext, ad
|
|
|
1400
1400
|
}
|
|
1401
1401
|
|
|
1402
1402
|
func CertCloseStore(store Handle, flags uint32) (err error) {
|
|
1403
|
-
r1, _, e1 := syscall.
|
|
1403
|
+
r1, _, e1 := syscall.SyscallN(procCertCloseStore.Addr(), uintptr(store), uintptr(flags))
|
|
1404
1404
|
if r1 == 0 {
|
|
1405
1405
|
err = errnoErr(e1)
|
|
1406
1406
|
}
|
|
@@ -1408,7 +1408,7 @@ func CertCloseStore(store Handle, flags uint32) (err error) {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
|
|
1410
1410
|
func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
|
|
1411
|
-
r0, _, e1 := syscall.
|
|
1411
|
+
r0, _, e1 := syscall.SyscallN(procCertCreateCertificateContext.Addr(), uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
|
|
1412
1412
|
context = (*CertContext)(unsafe.Pointer(r0))
|
|
1413
1413
|
if context == nil {
|
|
1414
1414
|
err = errnoErr(e1)
|
|
@@ -1417,7 +1417,7 @@ func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, en
|
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
1419
|
func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
|
|
1420
|
-
r1, _, e1 := syscall.
|
|
1420
|
+
r1, _, e1 := syscall.SyscallN(procCertDeleteCertificateFromStore.Addr(), uintptr(unsafe.Pointer(certContext)))
|
|
1421
1421
|
if r1 == 0 {
|
|
1422
1422
|
err = errnoErr(e1)
|
|
1423
1423
|
}
|
|
@@ -1425,13 +1425,13 @@ func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
|
|
1427
1427
|
func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) {
|
|
1428
|
-
r0, _, _ := syscall.
|
|
1428
|
+
r0, _, _ := syscall.SyscallN(procCertDuplicateCertificateContext.Addr(), uintptr(unsafe.Pointer(certContext)))
|
|
1429
1429
|
dupContext = (*CertContext)(unsafe.Pointer(r0))
|
|
1430
1430
|
return
|
|
1431
1431
|
}
|
|
1432
1432
|
|
|
1433
1433
|
func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
|
|
1434
|
-
r0, _, e1 := syscall.
|
|
1434
|
+
r0, _, e1 := syscall.SyscallN(procCertEnumCertificatesInStore.Addr(), uintptr(store), uintptr(unsafe.Pointer(prevContext)))
|
|
1435
1435
|
context = (*CertContext)(unsafe.Pointer(r0))
|
|
1436
1436
|
if context == nil {
|
|
1437
1437
|
err = errnoErr(e1)
|
|
@@ -1440,7 +1440,7 @@ func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (contex
|
|
|
1440
1440
|
}
|
|
1441
1441
|
|
|
1442
1442
|
func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) {
|
|
1443
|
-
r0, _, e1 := syscall.
|
|
1443
|
+
r0, _, e1 := syscall.SyscallN(procCertFindCertificateInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))
|
|
1444
1444
|
cert = (*CertContext)(unsafe.Pointer(r0))
|
|
1445
1445
|
if cert == nil {
|
|
1446
1446
|
err = errnoErr(e1)
|
|
@@ -1449,7 +1449,7 @@ func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags
|
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
1451
|
func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) {
|
|
1452
|
-
r0, _, e1 := syscall.
|
|
1452
|
+
r0, _, e1 := syscall.SyscallN(procCertFindChainInStore.Addr(), uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))
|
|
1453
1453
|
certchain = (*CertChainContext)(unsafe.Pointer(r0))
|
|
1454
1454
|
if certchain == nil {
|
|
1455
1455
|
err = errnoErr(e1)
|
|
@@ -1458,18 +1458,18 @@ func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint3
|
|
|
1458
1458
|
}
|
|
1459
1459
|
|
|
1460
1460
|
func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) {
|
|
1461
|
-
r0, _, _ := syscall.
|
|
1461
|
+
r0, _, _ := syscall.SyscallN(procCertFindExtension.Addr(), uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))
|
|
1462
1462
|
ret = (*CertExtension)(unsafe.Pointer(r0))
|
|
1463
1463
|
return
|
|
1464
1464
|
}
|
|
1465
1465
|
|
|
1466
1466
|
func CertFreeCertificateChain(ctx *CertChainContext) {
|
|
1467
|
-
syscall.
|
|
1467
|
+
syscall.SyscallN(procCertFreeCertificateChain.Addr(), uintptr(unsafe.Pointer(ctx)))
|
|
1468
1468
|
return
|
|
1469
1469
|
}
|
|
1470
1470
|
|
|
1471
1471
|
func CertFreeCertificateContext(ctx *CertContext) (err error) {
|
|
1472
|
-
r1, _, e1 := syscall.
|
|
1472
|
+
r1, _, e1 := syscall.SyscallN(procCertFreeCertificateContext.Addr(), uintptr(unsafe.Pointer(ctx)))
|
|
1473
1473
|
if r1 == 0 {
|
|
1474
1474
|
err = errnoErr(e1)
|
|
1475
1475
|
}
|
|
@@ -1477,7 +1477,7 @@ func CertFreeCertificateContext(ctx *CertContext) (err error) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
|
|
1479
1479
|
func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
|
|
1480
|
-
r1, _, e1 := syscall.
|
|
1480
|
+
r1, _, e1 := syscall.SyscallN(procCertGetCertificateChain.Addr(), uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)))
|
|
1481
1481
|
if r1 == 0 {
|
|
1482
1482
|
err = errnoErr(e1)
|
|
1483
1483
|
}
|
|
@@ -1485,13 +1485,13 @@ func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, a
|
|
|
1485
1485
|
}
|
|
1486
1486
|
|
|
1487
1487
|
func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) {
|
|
1488
|
-
r0, _, _ := syscall.
|
|
1488
|
+
r0, _, _ := syscall.SyscallN(procCertGetNameStringW.Addr(), uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size))
|
|
1489
1489
|
chars = uint32(r0)
|
|
1490
1490
|
return
|
|
1491
1491
|
}
|
|
1492
1492
|
|
|
1493
1493
|
func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
|
|
1494
|
-
r0, _, e1 := syscall.
|
|
1494
|
+
r0, _, e1 := syscall.SyscallN(procCertOpenStore.Addr(), uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para))
|
|
1495
1495
|
handle = Handle(r0)
|
|
1496
1496
|
if handle == 0 {
|
|
1497
1497
|
err = errnoErr(e1)
|
|
@@ -1500,7 +1500,7 @@ func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptPr
|
|
|
1500
1500
|
}
|
|
1501
1501
|
|
|
1502
1502
|
func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
|
|
1503
|
-
r0, _, e1 := syscall.
|
|
1503
|
+
r0, _, e1 := syscall.SyscallN(procCertOpenSystemStoreW.Addr(), uintptr(hprov), uintptr(unsafe.Pointer(name)))
|
|
1504
1504
|
store = Handle(r0)
|
|
1505
1505
|
if store == 0 {
|
|
1506
1506
|
err = errnoErr(e1)
|
|
@@ -1509,7 +1509,7 @@ func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
|
|
1511
1511
|
func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
|
|
1512
|
-
r1, _, e1 := syscall.
|
|
1512
|
+
r1, _, e1 := syscall.SyscallN(procCertVerifyCertificateChainPolicy.Addr(), uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)))
|
|
1513
1513
|
if r1 == 0 {
|
|
1514
1514
|
err = errnoErr(e1)
|
|
1515
1515
|
}
|
|
@@ -1521,7 +1521,7 @@ func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, paramete
|
|
|
1521
1521
|
if *callerFreeProvOrNCryptKey {
|
|
1522
1522
|
_p0 = 1
|
|
1523
1523
|
}
|
|
1524
|
-
r1, _, e1 := syscall.
|
|
1524
|
+
r1, _, e1 := syscall.SyscallN(procCryptAcquireCertificatePrivateKey.Addr(), uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))
|
|
1525
1525
|
*callerFreeProvOrNCryptKey = _p0 != 0
|
|
1526
1526
|
if r1 == 0 {
|
|
1527
1527
|
err = errnoErr(e1)
|
|
@@ -1530,7 +1530,7 @@ func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, paramete
|
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
1532
1532
|
func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) {
|
|
1533
|
-
r1, _, e1 := syscall.
|
|
1533
|
+
r1, _, e1 := syscall.SyscallN(procCryptDecodeObject.Addr(), uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)))
|
|
1534
1534
|
if r1 == 0 {
|
|
1535
1535
|
err = errnoErr(e1)
|
|
1536
1536
|
}
|
|
@@ -1538,7 +1538,7 @@ func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte
|
|
|
1538
1538
|
}
|
|
1539
1539
|
|
|
1540
1540
|
func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
|
|
1541
|
-
r1, _, e1 := syscall.
|
|
1541
|
+
r1, _, e1 := syscall.SyscallN(procCryptProtectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)))
|
|
1542
1542
|
if r1 == 0 {
|
|
1543
1543
|
err = errnoErr(e1)
|
|
1544
1544
|
}
|
|
@@ -1546,7 +1546,7 @@ func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob,
|
|
|
1546
1546
|
}
|
|
1547
1547
|
|
|
1548
1548
|
func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) {
|
|
1549
|
-
r1, _, e1 := syscall.
|
|
1549
|
+
r1, _, e1 := syscall.SyscallN(procCryptQueryObject.Addr(), uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)))
|
|
1550
1550
|
if r1 == 0 {
|
|
1551
1551
|
err = errnoErr(e1)
|
|
1552
1552
|
}
|
|
@@ -1554,7 +1554,7 @@ func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentT
|
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
1556
1556
|
func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
|
|
1557
|
-
r1, _, e1 := syscall.
|
|
1557
|
+
r1, _, e1 := syscall.SyscallN(procCryptUnprotectData.Addr(), uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)))
|
|
1558
1558
|
if r1 == 0 {
|
|
1559
1559
|
err = errnoErr(e1)
|
|
1560
1560
|
}
|
|
@@ -1562,7 +1562,7 @@ func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBl
|
|
|
1562
1562
|
}
|
|
1563
1563
|
|
|
1564
1564
|
func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) {
|
|
1565
|
-
r0, _, e1 := syscall.
|
|
1565
|
+
r0, _, e1 := syscall.SyscallN(procPFXImportCertStore.Addr(), uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))
|
|
1566
1566
|
store = Handle(r0)
|
|
1567
1567
|
if store == 0 {
|
|
1568
1568
|
err = errnoErr(e1)
|
|
@@ -1571,7 +1571,7 @@ func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (sto
|
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
1573
1573
|
func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
|
|
1574
|
-
r0, _, _ := syscall.
|
|
1574
|
+
r0, _, _ := syscall.SyscallN(procDnsNameCompare_W.Addr(), uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)))
|
|
1575
1575
|
same = r0 != 0
|
|
1576
1576
|
return
|
|
1577
1577
|
}
|
|
@@ -1586,7 +1586,7 @@ func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSR
|
|
|
1586
1586
|
}
|
|
1587
1587
|
|
|
1588
1588
|
func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
|
|
1589
|
-
r0, _, _ := syscall.
|
|
1589
|
+
r0, _, _ := syscall.SyscallN(procDnsQuery_W.Addr(), uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
|
|
1590
1590
|
if r0 != 0 {
|
|
1591
1591
|
status = syscall.Errno(r0)
|
|
1592
1592
|
}
|
|
@@ -1594,12 +1594,12 @@ func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DN
|
|
|
1594
1594
|
}
|
|
1595
1595
|
|
|
1596
1596
|
func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
|
|
1597
|
-
syscall.
|
|
1597
|
+
syscall.SyscallN(procDnsRecordListFree.Addr(), uintptr(unsafe.Pointer(rl)), uintptr(freetype))
|
|
1598
1598
|
return
|
|
1599
1599
|
}
|
|
1600
1600
|
|
|
1601
1601
|
func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
|
|
1602
|
-
r0, _, _ := syscall.
|
|
1602
|
+
r0, _, _ := syscall.SyscallN(procDwmGetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size))
|
|
1603
1603
|
if r0 != 0 {
|
|
1604
1604
|
ret = syscall.Errno(r0)
|
|
1605
1605
|
}
|
|
@@ -1607,7 +1607,7 @@ func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si
|
|
|
1607
1607
|
}
|
|
1608
1608
|
|
|
1609
1609
|
func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
|
|
1610
|
-
r0, _, _ := syscall.
|
|
1610
|
+
r0, _, _ := syscall.SyscallN(procDwmSetWindowAttribute.Addr(), uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size))
|
|
1611
1611
|
if r0 != 0 {
|
|
1612
1612
|
ret = syscall.Errno(r0)
|
|
1613
1613
|
}
|
|
@@ -1615,7 +1615,7 @@ func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, si
|
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
1617
|
func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {
|
|
1618
|
-
r0, _, _ := syscall.
|
|
1618
|
+
r0, _, _ := syscall.SyscallN(procCancelMibChangeNotify2.Addr(), uintptr(notificationHandle))
|
|
1619
1619
|
if r0 != 0 {
|
|
1620
1620
|
errcode = syscall.Errno(r0)
|
|
1621
1621
|
}
|
|
@@ -1623,7 +1623,7 @@ func CancelMibChangeNotify2(notificationHandle Handle) (errcode error) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
|
|
1625
1625
|
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
|
|
1626
|
-
r0, _, _ := syscall.
|
|
1626
|
+
r0, _, _ := syscall.SyscallN(procGetAdaptersAddresses.Addr(), uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)))
|
|
1627
1627
|
if r0 != 0 {
|
|
1628
1628
|
errcode = syscall.Errno(r0)
|
|
1629
1629
|
}
|
|
@@ -1631,7 +1631,7 @@ func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapter
|
|
|
1631
1631
|
}
|
|
1632
1632
|
|
|
1633
1633
|
func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
|
|
1634
|
-
r0, _, _ := syscall.
|
|
1634
|
+
r0, _, _ := syscall.SyscallN(procGetAdaptersInfo.Addr(), uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)))
|
|
1635
1635
|
if r0 != 0 {
|
|
1636
1636
|
errcode = syscall.Errno(r0)
|
|
1637
1637
|
}
|
|
@@ -1639,7 +1639,7 @@ func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
|
|
|
1639
1639
|
}
|
|
1640
1640
|
|
|
1641
1641
|
func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) {
|
|
1642
|
-
r0, _, _ := syscall.
|
|
1642
|
+
r0, _, _ := syscall.SyscallN(procGetBestInterfaceEx.Addr(), uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)))
|
|
1643
1643
|
if r0 != 0 {
|
|
1644
1644
|
errcode = syscall.Errno(r0)
|
|
1645
1645
|
}
|
|
@@ -1647,7 +1647,7 @@ func getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcod
|
|
|
1647
1647
|
}
|
|
1648
1648
|
|
|
1649
1649
|
func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
|
|
1650
|
-
r0, _, _ := syscall.
|
|
1650
|
+
r0, _, _ := syscall.SyscallN(procGetIfEntry.Addr(), uintptr(unsafe.Pointer(pIfRow)))
|
|
1651
1651
|
if r0 != 0 {
|
|
1652
1652
|
errcode = syscall.Errno(r0)
|
|
1653
1653
|
}
|
|
@@ -1655,7 +1655,7 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
|
|
1657
1657
|
func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
|
|
1658
|
-
r0, _, _ := syscall.
|
|
1658
|
+
r0, _, _ := syscall.SyscallN(procGetIfEntry2Ex.Addr(), uintptr(level), uintptr(unsafe.Pointer(row)))
|
|
1659
1659
|
if r0 != 0 {
|
|
1660
1660
|
errcode = syscall.Errno(r0)
|
|
1661
1661
|
}
|
|
@@ -1663,7 +1663,7 @@ func GetIfEntry2Ex(level uint32, row *MibIfRow2) (errcode error) {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
|
|
1665
1665
|
func GetUnicastIpAddressEntry(row *MibUnicastIpAddressRow) (errcode error) {
|
|
1666
|
-
r0, _, _ := syscall.
|
|
1666
|
+
r0, _, _ := syscall.SyscallN(procGetUnicastIpAddressEntry.Addr(), uintptr(unsafe.Pointer(row)))
|
|
1667
1667
|
if r0 != 0 {
|
|
1668
1668
|
errcode = syscall.Errno(r0)
|
|
1669
1669
|
}
|
|
@@ -1675,7 +1675,7 @@ func NotifyIpInterfaceChange(family uint16, callback uintptr, callerContext unsa
|
|
|
1675
1675
|
if initialNotification {
|
|
1676
1676
|
_p0 = 1
|
|
1677
1677
|
}
|
|
1678
|
-
r0, _, _ := syscall.
|
|
1678
|
+
r0, _, _ := syscall.SyscallN(procNotifyIpInterfaceChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
|
|
1679
1679
|
if r0 != 0 {
|
|
1680
1680
|
errcode = syscall.Errno(r0)
|
|
1681
1681
|
}
|
|
@@ -1687,7 +1687,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext
|
|
|
1687
1687
|
if initialNotification {
|
|
1688
1688
|
_p0 = 1
|
|
1689
1689
|
}
|
|
1690
|
-
r0, _, _ := syscall.
|
|
1690
|
+
r0, _, _ := syscall.SyscallN(procNotifyUnicastIpAddressChange.Addr(), uintptr(family), uintptr(callback), uintptr(callerContext), uintptr(_p0), uintptr(unsafe.Pointer(notificationHandle)))
|
|
1691
1691
|
if r0 != 0 {
|
|
1692
1692
|
errcode = syscall.Errno(r0)
|
|
1693
1693
|
}
|
|
@@ -1695,7 +1695,7 @@ func NotifyUnicastIpAddressChange(family uint16, callback uintptr, callerContext
|
|
|
1695
1695
|
}
|
|
1696
1696
|
|
|
1697
1697
|
func AddDllDirectory(path *uint16) (cookie uintptr, err error) {
|
|
1698
|
-
r0, _, e1 := syscall.
|
|
1698
|
+
r0, _, e1 := syscall.SyscallN(procAddDllDirectory.Addr(), uintptr(unsafe.Pointer(path)))
|
|
1699
1699
|
cookie = uintptr(r0)
|
|
1700
1700
|
if cookie == 0 {
|
|
1701
1701
|
err = errnoErr(e1)
|
|
@@ -1704,7 +1704,7 @@ func AddDllDirectory(path *uint16) (cookie uintptr, err error) {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
|
|
1706
1706
|
func AssignProcessToJobObject(job Handle, process Handle) (err error) {
|
|
1707
|
-
r1, _, e1 := syscall.
|
|
1707
|
+
r1, _, e1 := syscall.SyscallN(procAssignProcessToJobObject.Addr(), uintptr(job), uintptr(process))
|
|
1708
1708
|
if r1 == 0 {
|
|
1709
1709
|
err = errnoErr(e1)
|
|
1710
1710
|
}
|
|
@@ -1712,7 +1712,7 @@ func AssignProcessToJobObject(job Handle, process Handle) (err error) {
|
|
|
1712
1712
|
}
|
|
1713
1713
|
|
|
1714
1714
|
func CancelIo(s Handle) (err error) {
|
|
1715
|
-
r1, _, e1 := syscall.
|
|
1715
|
+
r1, _, e1 := syscall.SyscallN(procCancelIo.Addr(), uintptr(s))
|
|
1716
1716
|
if r1 == 0 {
|
|
1717
1717
|
err = errnoErr(e1)
|
|
1718
1718
|
}
|
|
@@ -1720,7 +1720,7 @@ func CancelIo(s Handle) (err error) {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
|
|
1722
1722
|
func CancelIoEx(s Handle, o *Overlapped) (err error) {
|
|
1723
|
-
r1, _, e1 := syscall.
|
|
1723
|
+
r1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(s), uintptr(unsafe.Pointer(o)))
|
|
1724
1724
|
if r1 == 0 {
|
|
1725
1725
|
err = errnoErr(e1)
|
|
1726
1726
|
}
|
|
@@ -1728,7 +1728,7 @@ func CancelIoEx(s Handle, o *Overlapped) (err error) {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
|
|
1730
1730
|
func ClearCommBreak(handle Handle) (err error) {
|
|
1731
|
-
r1, _, e1 := syscall.
|
|
1731
|
+
r1, _, e1 := syscall.SyscallN(procClearCommBreak.Addr(), uintptr(handle))
|
|
1732
1732
|
if r1 == 0 {
|
|
1733
1733
|
err = errnoErr(e1)
|
|
1734
1734
|
}
|
|
@@ -1736,7 +1736,7 @@ func ClearCommBreak(handle Handle) (err error) {
|
|
|
1736
1736
|
}
|
|
1737
1737
|
|
|
1738
1738
|
func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) {
|
|
1739
|
-
r1, _, e1 := syscall.
|
|
1739
|
+
r1, _, e1 := syscall.SyscallN(procClearCommError.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat)))
|
|
1740
1740
|
if r1 == 0 {
|
|
1741
1741
|
err = errnoErr(e1)
|
|
1742
1742
|
}
|
|
@@ -1744,7 +1744,7 @@ func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error
|
|
|
1744
1744
|
}
|
|
1745
1745
|
|
|
1746
1746
|
func CloseHandle(handle Handle) (err error) {
|
|
1747
|
-
r1, _, e1 := syscall.
|
|
1747
|
+
r1, _, e1 := syscall.SyscallN(procCloseHandle.Addr(), uintptr(handle))
|
|
1748
1748
|
if r1 == 0 {
|
|
1749
1749
|
err = errnoErr(e1)
|
|
1750
1750
|
}
|
|
@@ -1752,12 +1752,12 @@ func CloseHandle(handle Handle) (err error) {
|
|
|
1752
1752
|
}
|
|
1753
1753
|
|
|
1754
1754
|
func ClosePseudoConsole(console Handle) {
|
|
1755
|
-
syscall.
|
|
1755
|
+
syscall.SyscallN(procClosePseudoConsole.Addr(), uintptr(console))
|
|
1756
1756
|
return
|
|
1757
1757
|
}
|
|
1758
1758
|
|
|
1759
1759
|
func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
|
|
1760
|
-
r1, _, e1 := syscall.
|
|
1760
|
+
r1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(overlapped)))
|
|
1761
1761
|
if r1 == 0 {
|
|
1762
1762
|
err = errnoErr(e1)
|
|
1763
1763
|
}
|
|
@@ -1765,7 +1765,7 @@ func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
|
|
1767
1767
|
func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
|
|
1768
|
-
r1, _, e1 := syscall.
|
|
1768
|
+
r1, _, e1 := syscall.SyscallN(procCreateDirectoryW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)))
|
|
1769
1769
|
if r1 == 0 {
|
|
1770
1770
|
err = errnoErr(e1)
|
|
1771
1771
|
}
|
|
@@ -1773,7 +1773,7 @@ func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
|
|
1775
1775
|
func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
|
|
1776
|
-
r0, _, e1 := syscall.
|
|
1776
|
+
r0, _, e1 := syscall.SyscallN(procCreateEventExW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess))
|
|
1777
1777
|
handle = Handle(r0)
|
|
1778
1778
|
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
|
|
1779
1779
|
err = errnoErr(e1)
|
|
@@ -1782,7 +1782,7 @@ func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, d
|
|
|
1782
1782
|
}
|
|
1783
1783
|
|
|
1784
1784
|
func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
|
|
1785
|
-
r0, _, e1 := syscall.
|
|
1785
|
+
r0, _, e1 := syscall.SyscallN(procCreateEventW.Addr(), uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)))
|
|
1786
1786
|
handle = Handle(r0)
|
|
1787
1787
|
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
|
|
1788
1788
|
err = errnoErr(e1)
|
|
@@ -1791,7 +1791,7 @@ func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialStat
|
|
|
1791
1791
|
}
|
|
1792
1792
|
|
|
1793
1793
|
func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
|
|
1794
|
-
r0, _, e1 := syscall.
|
|
1794
|
+
r0, _, e1 := syscall.SyscallN(procCreateFileMappingW.Addr(), uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
|
|
1795
1795
|
handle = Handle(r0)
|
|
1796
1796
|
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
|
|
1797
1797
|
err = errnoErr(e1)
|
|
@@ -1800,7 +1800,7 @@ func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxS
|
|
|
1800
1800
|
}
|
|
1801
1801
|
|
|
1802
1802
|
func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
|
|
1803
|
-
r0, _, e1 := syscall.
|
|
1803
|
+
r0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile))
|
|
1804
1804
|
handle = Handle(r0)
|
|
1805
1805
|
if handle == InvalidHandle {
|
|
1806
1806
|
err = errnoErr(e1)
|
|
@@ -1809,7 +1809,7 @@ func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes
|
|
|
1809
1809
|
}
|
|
1810
1810
|
|
|
1811
1811
|
func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
|
|
1812
|
-
r1, _, e1 := syscall.
|
|
1812
|
+
r1, _, e1 := syscall.SyscallN(procCreateHardLinkW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
|
|
1813
1813
|
if r1&0xff == 0 {
|
|
1814
1814
|
err = errnoErr(e1)
|
|
1815
1815
|
}
|
|
@@ -1817,7 +1817,7 @@ func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr
|
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
1819
1819
|
func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) {
|
|
1820
|
-
r0, _, e1 := syscall.
|
|
1820
|
+
r0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt))
|
|
1821
1821
|
handle = Handle(r0)
|
|
1822
1822
|
if handle == 0 {
|
|
1823
1823
|
err = errnoErr(e1)
|
|
@@ -1826,7 +1826,7 @@ func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, thr
|
|
|
1826
1826
|
}
|
|
1827
1827
|
|
|
1828
1828
|
func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {
|
|
1829
|
-
r0, _, e1 := syscall.
|
|
1829
|
+
r0, _, e1 := syscall.SyscallN(procCreateJobObjectW.Addr(), uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)))
|
|
1830
1830
|
handle = Handle(r0)
|
|
1831
1831
|
if handle == 0 {
|
|
1832
1832
|
err = errnoErr(e1)
|
|
@@ -1835,7 +1835,7 @@ func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle,
|
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
1837
|
func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
|
|
1838
|
-
r0, _, e1 := syscall.
|
|
1838
|
+
r0, _, e1 := syscall.SyscallN(procCreateMutexExW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess))
|
|
1839
1839
|
handle = Handle(r0)
|
|
1840
1840
|
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
|
|
1841
1841
|
err = errnoErr(e1)
|
|
@@ -1848,7 +1848,7 @@ func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16
|
|
|
1848
1848
|
if initialOwner {
|
|
1849
1849
|
_p0 = 1
|
|
1850
1850
|
}
|
|
1851
|
-
r0, _, e1 := syscall.
|
|
1851
|
+
r0, _, e1 := syscall.SyscallN(procCreateMutexW.Addr(), uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
|
|
1852
1852
|
handle = Handle(r0)
|
|
1853
1853
|
if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
|
|
1854
1854
|
err = errnoErr(e1)
|
|
@@ -1857,7 +1857,7 @@ func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16
|
|
|
1857
1857
|
}
|
|
1858
1858
|
|
|
1859
1859
|
func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) {
|
|
1860
|
-
r0, _, e1 := syscall.
|
|
1860
|
+
r0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)))
|
|
1861
1861
|
handle = Handle(r0)
|
|
1862
1862
|
if handle == InvalidHandle {
|
|
1863
1863
|
err = errnoErr(e1)
|
|
@@ -1866,7 +1866,7 @@ func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances u
|
|
|
1866
1866
|
}
|
|
1867
1867
|
|
|
1868
1868
|
func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
|
|
1869
|
-
r1, _, e1 := syscall.
|
|
1869
|
+
r1, _, e1 := syscall.SyscallN(procCreatePipe.Addr(), uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size))
|
|
1870
1870
|
if r1 == 0 {
|
|
1871
1871
|
err = errnoErr(e1)
|
|
1872
1872
|
}
|
|
@@ -1878,7 +1878,7 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA
|
|
|
1878
1878
|
if inheritHandles {
|
|
1879
1879
|
_p0 = 1
|
|
1880
1880
|
}
|
|
1881
|
-
r1, _, e1 := syscall.
|
|
1881
|
+
r1, _, e1 := syscall.SyscallN(procCreateProcessW.Addr(), uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)))
|
|
1882
1882
|
if r1 == 0 {
|
|
1883
1883
|
err = errnoErr(e1)
|
|
1884
1884
|
}
|
|
@@ -1886,7 +1886,7 @@ func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA
|
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
1888
|
func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) {
|
|
1889
|
-
r0, _, _ := syscall.
|
|
1889
|
+
r0, _, _ := syscall.SyscallN(procCreatePseudoConsole.Addr(), uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)))
|
|
1890
1890
|
if r0 != 0 {
|
|
1891
1891
|
hr = syscall.Errno(r0)
|
|
1892
1892
|
}
|
|
@@ -1894,7 +1894,7 @@ func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pcons
|
|
|
1894
1894
|
}
|
|
1895
1895
|
|
|
1896
1896
|
func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
|
|
1897
|
-
r1, _, e1 := syscall.
|
|
1897
|
+
r1, _, e1 := syscall.SyscallN(procCreateSymbolicLinkW.Addr(), uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
|
|
1898
1898
|
if r1&0xff == 0 {
|
|
1899
1899
|
err = errnoErr(e1)
|
|
1900
1900
|
}
|
|
@@ -1902,7 +1902,7 @@ func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags u
|
|
|
1902
1902
|
}
|
|
1903
1903
|
|
|
1904
1904
|
func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
|
|
1905
|
-
r0, _, e1 := syscall.
|
|
1905
|
+
r0, _, e1 := syscall.SyscallN(procCreateToolhelp32Snapshot.Addr(), uintptr(flags), uintptr(processId))
|
|
1906
1906
|
handle = Handle(r0)
|
|
1907
1907
|
if handle == InvalidHandle {
|
|
1908
1908
|
err = errnoErr(e1)
|
|
@@ -1911,7 +1911,7 @@ func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, er
|
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
1913
|
func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
|
|
1914
|
-
r1, _, e1 := syscall.
|
|
1914
|
+
r1, _, e1 := syscall.SyscallN(procDefineDosDeviceW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
|
|
1915
1915
|
if r1 == 0 {
|
|
1916
1916
|
err = errnoErr(e1)
|
|
1917
1917
|
}
|
|
@@ -1919,7 +1919,7 @@ func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err
|
|
|
1919
1919
|
}
|
|
1920
1920
|
|
|
1921
1921
|
func DeleteFile(path *uint16) (err error) {
|
|
1922
|
-
r1, _, e1 := syscall.
|
|
1922
|
+
r1, _, e1 := syscall.SyscallN(procDeleteFileW.Addr(), uintptr(unsafe.Pointer(path)))
|
|
1923
1923
|
if r1 == 0 {
|
|
1924
1924
|
err = errnoErr(e1)
|
|
1925
1925
|
}
|
|
@@ -1927,12 +1927,12 @@ func DeleteFile(path *uint16) (err error) {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
|
|
1929
1929
|
func deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) {
|
|
1930
|
-
syscall.
|
|
1930
|
+
syscall.SyscallN(procDeleteProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)))
|
|
1931
1931
|
return
|
|
1932
1932
|
}
|
|
1933
1933
|
|
|
1934
1934
|
func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
|
|
1935
|
-
r1, _, e1 := syscall.
|
|
1935
|
+
r1, _, e1 := syscall.SyscallN(procDeleteVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)))
|
|
1936
1936
|
if r1 == 0 {
|
|
1937
1937
|
err = errnoErr(e1)
|
|
1938
1938
|
}
|
|
@@ -1940,7 +1940,7 @@ func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
|
|
|
1940
1940
|
}
|
|
1941
1941
|
|
|
1942
1942
|
func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
|
|
1943
|
-
r1, _, e1 := syscall.
|
|
1943
|
+
r1, _, e1 := syscall.SyscallN(procDeviceIoControl.Addr(), uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)))
|
|
1944
1944
|
if r1 == 0 {
|
|
1945
1945
|
err = errnoErr(e1)
|
|
1946
1946
|
}
|
|
@@ -1948,7 +1948,7 @@ func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBuff
|
|
|
1948
1948
|
}
|
|
1949
1949
|
|
|
1950
1950
|
func DisconnectNamedPipe(pipe Handle) (err error) {
|
|
1951
|
-
r1, _, e1 := syscall.
|
|
1951
|
+
r1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe))
|
|
1952
1952
|
if r1 == 0 {
|
|
1953
1953
|
err = errnoErr(e1)
|
|
1954
1954
|
}
|
|
@@ -1960,7 +1960,7 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP
|
|
|
1960
1960
|
if bInheritHandle {
|
|
1961
1961
|
_p0 = 1
|
|
1962
1962
|
}
|
|
1963
|
-
r1, _, e1 := syscall.
|
|
1963
|
+
r1, _, e1 := syscall.SyscallN(procDuplicateHandle.Addr(), uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions))
|
|
1964
1964
|
if r1 == 0 {
|
|
1965
1965
|
err = errnoErr(e1)
|
|
1966
1966
|
}
|
|
@@ -1968,7 +1968,7 @@ func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetP
|
|
|
1968
1968
|
}
|
|
1969
1969
|
|
|
1970
1970
|
func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) {
|
|
1971
|
-
r1, _, e1 := syscall.
|
|
1971
|
+
r1, _, e1 := syscall.SyscallN(procEscapeCommFunction.Addr(), uintptr(handle), uintptr(dwFunc))
|
|
1972
1972
|
if r1 == 0 {
|
|
1973
1973
|
err = errnoErr(e1)
|
|
1974
1974
|
}
|
|
@@ -1976,12 +1976,12 @@ func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
|
|
1978
1978
|
func ExitProcess(exitcode uint32) {
|
|
1979
|
-
syscall.
|
|
1979
|
+
syscall.SyscallN(procExitProcess.Addr(), uintptr(exitcode))
|
|
1980
1980
|
return
|
|
1981
1981
|
}
|
|
1982
1982
|
|
|
1983
1983
|
func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
|
|
1984
|
-
r0, _, e1 := syscall.
|
|
1984
|
+
r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
|
|
1985
1985
|
n = uint32(r0)
|
|
1986
1986
|
if n == 0 {
|
|
1987
1987
|
err = errnoErr(e1)
|
|
@@ -1990,7 +1990,7 @@ func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32,
|
|
|
1990
1990
|
}
|
|
1991
1991
|
|
|
1992
1992
|
func FindClose(handle Handle) (err error) {
|
|
1993
|
-
r1, _, e1 := syscall.
|
|
1993
|
+
r1, _, e1 := syscall.SyscallN(procFindClose.Addr(), uintptr(handle))
|
|
1994
1994
|
if r1 == 0 {
|
|
1995
1995
|
err = errnoErr(e1)
|
|
1996
1996
|
}
|
|
@@ -1998,7 +1998,7 @@ func FindClose(handle Handle) (err error) {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
|
|
2000
2000
|
func FindCloseChangeNotification(handle Handle) (err error) {
|
|
2001
|
-
r1, _, e1 := syscall.
|
|
2001
|
+
r1, _, e1 := syscall.SyscallN(procFindCloseChangeNotification.Addr(), uintptr(handle))
|
|
2002
2002
|
if r1 == 0 {
|
|
2003
2003
|
err = errnoErr(e1)
|
|
2004
2004
|
}
|
|
@@ -2019,7 +2019,7 @@ func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter
|
|
|
2019
2019
|
if watchSubtree {
|
|
2020
2020
|
_p1 = 1
|
|
2021
2021
|
}
|
|
2022
|
-
r0, _, e1 := syscall.
|
|
2022
|
+
r0, _, e1 := syscall.SyscallN(procFindFirstChangeNotificationW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))
|
|
2023
2023
|
handle = Handle(r0)
|
|
2024
2024
|
if handle == InvalidHandle {
|
|
2025
2025
|
err = errnoErr(e1)
|
|
@@ -2028,7 +2028,7 @@ func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter
|
|
|
2028
2028
|
}
|
|
2029
2029
|
|
|
2030
2030
|
func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
|
|
2031
|
-
r0, _, e1 := syscall.
|
|
2031
|
+
r0, _, e1 := syscall.SyscallN(procFindFirstFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)))
|
|
2032
2032
|
handle = Handle(r0)
|
|
2033
2033
|
if handle == InvalidHandle {
|
|
2034
2034
|
err = errnoErr(e1)
|
|
@@ -2037,7 +2037,7 @@ func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err erro
|
|
|
2037
2037
|
}
|
|
2038
2038
|
|
|
2039
2039
|
func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
|
|
2040
|
-
r0, _, e1 := syscall.
|
|
2040
|
+
r0, _, e1 := syscall.SyscallN(procFindFirstVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
|
|
2041
2041
|
handle = Handle(r0)
|
|
2042
2042
|
if handle == InvalidHandle {
|
|
2043
2043
|
err = errnoErr(e1)
|
|
@@ -2046,7 +2046,7 @@ func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, b
|
|
|
2046
2046
|
}
|
|
2047
2047
|
|
|
2048
2048
|
func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
|
|
2049
|
-
r0, _, e1 := syscall.
|
|
2049
|
+
r0, _, e1 := syscall.SyscallN(procFindFirstVolumeW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
|
|
2050
2050
|
handle = Handle(r0)
|
|
2051
2051
|
if handle == InvalidHandle {
|
|
2052
2052
|
err = errnoErr(e1)
|
|
@@ -2055,7 +2055,7 @@ func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, er
|
|
|
2055
2055
|
}
|
|
2056
2056
|
|
|
2057
2057
|
func FindNextChangeNotification(handle Handle) (err error) {
|
|
2058
|
-
r1, _, e1 := syscall.
|
|
2058
|
+
r1, _, e1 := syscall.SyscallN(procFindNextChangeNotification.Addr(), uintptr(handle))
|
|
2059
2059
|
if r1 == 0 {
|
|
2060
2060
|
err = errnoErr(e1)
|
|
2061
2061
|
}
|
|
@@ -2063,7 +2063,7 @@ func FindNextChangeNotification(handle Handle) (err error) {
|
|
|
2063
2063
|
}
|
|
2064
2064
|
|
|
2065
2065
|
func findNextFile1(handle Handle, data *win32finddata1) (err error) {
|
|
2066
|
-
r1, _, e1 := syscall.
|
|
2066
|
+
r1, _, e1 := syscall.SyscallN(procFindNextFileW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data)))
|
|
2067
2067
|
if r1 == 0 {
|
|
2068
2068
|
err = errnoErr(e1)
|
|
2069
2069
|
}
|
|
@@ -2071,7 +2071,7 @@ func findNextFile1(handle Handle, data *win32finddata1) (err error) {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
|
|
2073
2073
|
func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
|
|
2074
|
-
r1, _, e1 := syscall.
|
|
2074
|
+
r1, _, e1 := syscall.SyscallN(procFindNextVolumeMountPointW.Addr(), uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
|
|
2075
2075
|
if r1 == 0 {
|
|
2076
2076
|
err = errnoErr(e1)
|
|
2077
2077
|
}
|
|
@@ -2079,7 +2079,7 @@ func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uin
|
|
|
2079
2079
|
}
|
|
2080
2080
|
|
|
2081
2081
|
func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
|
|
2082
|
-
r1, _, e1 := syscall.
|
|
2082
|
+
r1, _, e1 := syscall.SyscallN(procFindNextVolumeW.Addr(), uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
|
|
2083
2083
|
if r1 == 0 {
|
|
2084
2084
|
err = errnoErr(e1)
|
|
2085
2085
|
}
|
|
@@ -2087,7 +2087,7 @@ func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32)
|
|
|
2087
2087
|
}
|
|
2088
2088
|
|
|
2089
2089
|
func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) {
|
|
2090
|
-
r0, _, e1 := syscall.
|
|
2090
|
+
r0, _, e1 := syscall.SyscallN(procFindResourceW.Addr(), uintptr(module), uintptr(name), uintptr(resType))
|
|
2091
2091
|
resInfo = Handle(r0)
|
|
2092
2092
|
if resInfo == 0 {
|
|
2093
2093
|
err = errnoErr(e1)
|
|
@@ -2096,7 +2096,7 @@ func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle,
|
|
|
2096
2096
|
}
|
|
2097
2097
|
|
|
2098
2098
|
func FindVolumeClose(findVolume Handle) (err error) {
|
|
2099
|
-
r1, _, e1 := syscall.
|
|
2099
|
+
r1, _, e1 := syscall.SyscallN(procFindVolumeClose.Addr(), uintptr(findVolume))
|
|
2100
2100
|
if r1 == 0 {
|
|
2101
2101
|
err = errnoErr(e1)
|
|
2102
2102
|
}
|
|
@@ -2104,7 +2104,7 @@ func FindVolumeClose(findVolume Handle) (err error) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
|
|
2106
2106
|
func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
|
|
2107
|
-
r1, _, e1 := syscall.
|
|
2107
|
+
r1, _, e1 := syscall.SyscallN(procFindVolumeMountPointClose.Addr(), uintptr(findVolumeMountPoint))
|
|
2108
2108
|
if r1 == 0 {
|
|
2109
2109
|
err = errnoErr(e1)
|
|
2110
2110
|
}
|
|
@@ -2112,7 +2112,7 @@ func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
|
|
2114
2114
|
func FlushFileBuffers(handle Handle) (err error) {
|
|
2115
|
-
r1, _, e1 := syscall.
|
|
2115
|
+
r1, _, e1 := syscall.SyscallN(procFlushFileBuffers.Addr(), uintptr(handle))
|
|
2116
2116
|
if r1 == 0 {
|
|
2117
2117
|
err = errnoErr(e1)
|
|
2118
2118
|
}
|
|
@@ -2120,7 +2120,7 @@ func FlushFileBuffers(handle Handle) (err error) {
|
|
|
2120
2120
|
}
|
|
2121
2121
|
|
|
2122
2122
|
func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
|
|
2123
|
-
r1, _, e1 := syscall.
|
|
2123
|
+
r1, _, e1 := syscall.SyscallN(procFlushViewOfFile.Addr(), uintptr(addr), uintptr(length))
|
|
2124
2124
|
if r1 == 0 {
|
|
2125
2125
|
err = errnoErr(e1)
|
|
2126
2126
|
}
|
|
@@ -2132,7 +2132,7 @@ func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, bu
|
|
|
2132
2132
|
if len(buf) > 0 {
|
|
2133
2133
|
_p0 = &buf[0]
|
|
2134
2134
|
}
|
|
2135
|
-
r0, _, e1 := syscall.
|
|
2135
|
+
r0, _, e1 := syscall.SyscallN(procFormatMessageW.Addr(), uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)))
|
|
2136
2136
|
n = uint32(r0)
|
|
2137
2137
|
if n == 0 {
|
|
2138
2138
|
err = errnoErr(e1)
|
|
@@ -2141,7 +2141,7 @@ func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, bu
|
|
|
2141
2141
|
}
|
|
2142
2142
|
|
|
2143
2143
|
func FreeEnvironmentStrings(envs *uint16) (err error) {
|
|
2144
|
-
r1, _, e1 := syscall.
|
|
2144
|
+
r1, _, e1 := syscall.SyscallN(procFreeEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(envs)))
|
|
2145
2145
|
if r1 == 0 {
|
|
2146
2146
|
err = errnoErr(e1)
|
|
2147
2147
|
}
|
|
@@ -2149,7 +2149,7 @@ func FreeEnvironmentStrings(envs *uint16) (err error) {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
|
|
2151
2151
|
func FreeLibrary(handle Handle) (err error) {
|
|
2152
|
-
r1, _, e1 := syscall.
|
|
2152
|
+
r1, _, e1 := syscall.SyscallN(procFreeLibrary.Addr(), uintptr(handle))
|
|
2153
2153
|
if r1 == 0 {
|
|
2154
2154
|
err = errnoErr(e1)
|
|
2155
2155
|
}
|
|
@@ -2157,7 +2157,7 @@ func FreeLibrary(handle Handle) (err error) {
|
|
|
2157
2157
|
}
|
|
2158
2158
|
|
|
2159
2159
|
func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {
|
|
2160
|
-
r1, _, e1 := syscall.
|
|
2160
|
+
r1, _, e1 := syscall.SyscallN(procGenerateConsoleCtrlEvent.Addr(), uintptr(ctrlEvent), uintptr(processGroupID))
|
|
2161
2161
|
if r1 == 0 {
|
|
2162
2162
|
err = errnoErr(e1)
|
|
2163
2163
|
}
|
|
@@ -2165,19 +2165,19 @@ func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err erro
|
|
|
2165
2165
|
}
|
|
2166
2166
|
|
|
2167
2167
|
func GetACP() (acp uint32) {
|
|
2168
|
-
r0, _, _ := syscall.
|
|
2168
|
+
r0, _, _ := syscall.SyscallN(procGetACP.Addr())
|
|
2169
2169
|
acp = uint32(r0)
|
|
2170
2170
|
return
|
|
2171
2171
|
}
|
|
2172
2172
|
|
|
2173
2173
|
func GetActiveProcessorCount(groupNumber uint16) (ret uint32) {
|
|
2174
|
-
r0, _, _ := syscall.
|
|
2174
|
+
r0, _, _ := syscall.SyscallN(procGetActiveProcessorCount.Addr(), uintptr(groupNumber))
|
|
2175
2175
|
ret = uint32(r0)
|
|
2176
2176
|
return
|
|
2177
2177
|
}
|
|
2178
2178
|
|
|
2179
2179
|
func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) {
|
|
2180
|
-
r1, _, e1 := syscall.
|
|
2180
|
+
r1, _, e1 := syscall.SyscallN(procGetCommModemStatus.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)))
|
|
2181
2181
|
if r1 == 0 {
|
|
2182
2182
|
err = errnoErr(e1)
|
|
2183
2183
|
}
|
|
@@ -2185,7 +2185,7 @@ func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
|
|
2187
2187
|
func GetCommState(handle Handle, lpDCB *DCB) (err error) {
|
|
2188
|
-
r1, _, e1 := syscall.
|
|
2188
|
+
r1, _, e1 := syscall.SyscallN(procGetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB)))
|
|
2189
2189
|
if r1 == 0 {
|
|
2190
2190
|
err = errnoErr(e1)
|
|
2191
2191
|
}
|
|
@@ -2193,7 +2193,7 @@ func GetCommState(handle Handle, lpDCB *DCB) (err error) {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
|
|
2195
2195
|
func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
|
|
2196
|
-
r1, _, e1 := syscall.
|
|
2196
|
+
r1, _, e1 := syscall.SyscallN(procGetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts)))
|
|
2197
2197
|
if r1 == 0 {
|
|
2198
2198
|
err = errnoErr(e1)
|
|
2199
2199
|
}
|
|
@@ -2201,13 +2201,13 @@ func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
2203
|
func GetCommandLine() (cmd *uint16) {
|
|
2204
|
-
r0, _, _ := syscall.
|
|
2204
|
+
r0, _, _ := syscall.SyscallN(procGetCommandLineW.Addr())
|
|
2205
2205
|
cmd = (*uint16)(unsafe.Pointer(r0))
|
|
2206
2206
|
return
|
|
2207
2207
|
}
|
|
2208
2208
|
|
|
2209
2209
|
func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
|
|
2210
|
-
r1, _, e1 := syscall.
|
|
2210
|
+
r1, _, e1 := syscall.SyscallN(procGetComputerNameExW.Addr(), uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
|
|
2211
2211
|
if r1 == 0 {
|
|
2212
2212
|
err = errnoErr(e1)
|
|
2213
2213
|
}
|
|
@@ -2215,7 +2215,7 @@ func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
|
|
2217
2217
|
func GetComputerName(buf *uint16, n *uint32) (err error) {
|
|
2218
|
-
r1, _, e1 := syscall.
|
|
2218
|
+
r1, _, e1 := syscall.SyscallN(procGetComputerNameW.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
|
|
2219
2219
|
if r1 == 0 {
|
|
2220
2220
|
err = errnoErr(e1)
|
|
2221
2221
|
}
|
|
@@ -2223,7 +2223,7 @@ func GetComputerName(buf *uint16, n *uint32) (err error) {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
|
|
2225
2225
|
func GetConsoleCP() (cp uint32, err error) {
|
|
2226
|
-
r0, _, e1 := syscall.
|
|
2226
|
+
r0, _, e1 := syscall.SyscallN(procGetConsoleCP.Addr())
|
|
2227
2227
|
cp = uint32(r0)
|
|
2228
2228
|
if cp == 0 {
|
|
2229
2229
|
err = errnoErr(e1)
|
|
@@ -2232,7 +2232,7 @@ func GetConsoleCP() (cp uint32, err error) {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
|
|
2234
2234
|
func GetConsoleMode(console Handle, mode *uint32) (err error) {
|
|
2235
|
-
r1, _, e1 := syscall.
|
|
2235
|
+
r1, _, e1 := syscall.SyscallN(procGetConsoleMode.Addr(), uintptr(console), uintptr(unsafe.Pointer(mode)))
|
|
2236
2236
|
if r1 == 0 {
|
|
2237
2237
|
err = errnoErr(e1)
|
|
2238
2238
|
}
|
|
@@ -2240,7 +2240,7 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) {
|
|
|
2240
2240
|
}
|
|
2241
2241
|
|
|
2242
2242
|
func GetConsoleOutputCP() (cp uint32, err error) {
|
|
2243
|
-
r0, _, e1 := syscall.
|
|
2243
|
+
r0, _, e1 := syscall.SyscallN(procGetConsoleOutputCP.Addr())
|
|
2244
2244
|
cp = uint32(r0)
|
|
2245
2245
|
if cp == 0 {
|
|
2246
2246
|
err = errnoErr(e1)
|
|
@@ -2249,7 +2249,7 @@ func GetConsoleOutputCP() (cp uint32, err error) {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
|
|
2251
2251
|
func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
|
|
2252
|
-
r1, _, e1 := syscall.
|
|
2252
|
+
r1, _, e1 := syscall.SyscallN(procGetConsoleScreenBufferInfo.Addr(), uintptr(console), uintptr(unsafe.Pointer(info)))
|
|
2253
2253
|
if r1 == 0 {
|
|
2254
2254
|
err = errnoErr(e1)
|
|
2255
2255
|
}
|
|
@@ -2257,7 +2257,7 @@ func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (
|
|
|
2257
2257
|
}
|
|
2258
2258
|
|
|
2259
2259
|
func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
|
|
2260
|
-
r0, _, e1 := syscall.
|
|
2260
|
+
r0, _, e1 := syscall.SyscallN(procGetCurrentDirectoryW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
|
|
2261
2261
|
n = uint32(r0)
|
|
2262
2262
|
if n == 0 {
|
|
2263
2263
|
err = errnoErr(e1)
|
|
@@ -2266,19 +2266,19 @@ func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
|
|
|
2266
2266
|
}
|
|
2267
2267
|
|
|
2268
2268
|
func GetCurrentProcessId() (pid uint32) {
|
|
2269
|
-
r0, _, _ := syscall.
|
|
2269
|
+
r0, _, _ := syscall.SyscallN(procGetCurrentProcessId.Addr())
|
|
2270
2270
|
pid = uint32(r0)
|
|
2271
2271
|
return
|
|
2272
2272
|
}
|
|
2273
2273
|
|
|
2274
2274
|
func GetCurrentThreadId() (id uint32) {
|
|
2275
|
-
r0, _, _ := syscall.
|
|
2275
|
+
r0, _, _ := syscall.SyscallN(procGetCurrentThreadId.Addr())
|
|
2276
2276
|
id = uint32(r0)
|
|
2277
2277
|
return
|
|
2278
2278
|
}
|
|
2279
2279
|
|
|
2280
2280
|
func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
|
|
2281
|
-
r1, _, e1 := syscall.
|
|
2281
|
+
r1, _, e1 := syscall.SyscallN(procGetDiskFreeSpaceExW.Addr(), uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)))
|
|
2282
2282
|
if r1 == 0 {
|
|
2283
2283
|
err = errnoErr(e1)
|
|
2284
2284
|
}
|
|
@@ -2286,13 +2286,13 @@ func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint6
|
|
|
2286
2286
|
}
|
|
2287
2287
|
|
|
2288
2288
|
func GetDriveType(rootPathName *uint16) (driveType uint32) {
|
|
2289
|
-
r0, _, _ := syscall.
|
|
2289
|
+
r0, _, _ := syscall.SyscallN(procGetDriveTypeW.Addr(), uintptr(unsafe.Pointer(rootPathName)))
|
|
2290
2290
|
driveType = uint32(r0)
|
|
2291
2291
|
return
|
|
2292
2292
|
}
|
|
2293
2293
|
|
|
2294
2294
|
func GetEnvironmentStrings() (envs *uint16, err error) {
|
|
2295
|
-
r0, _, e1 := syscall.
|
|
2295
|
+
r0, _, e1 := syscall.SyscallN(procGetEnvironmentStringsW.Addr())
|
|
2296
2296
|
envs = (*uint16)(unsafe.Pointer(r0))
|
|
2297
2297
|
if envs == nil {
|
|
2298
2298
|
err = errnoErr(e1)
|
|
@@ -2301,7 +2301,7 @@ func GetEnvironmentStrings() (envs *uint16, err error) {
|
|
|
2301
2301
|
}
|
|
2302
2302
|
|
|
2303
2303
|
func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
|
|
2304
|
-
r0, _, e1 := syscall.
|
|
2304
|
+
r0, _, e1 := syscall.SyscallN(procGetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
|
|
2305
2305
|
n = uint32(r0)
|
|
2306
2306
|
if n == 0 {
|
|
2307
2307
|
err = errnoErr(e1)
|
|
@@ -2310,7 +2310,7 @@ func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32
|
|
|
2310
2310
|
}
|
|
2311
2311
|
|
|
2312
2312
|
func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
|
|
2313
|
-
r1, _, e1 := syscall.
|
|
2313
|
+
r1, _, e1 := syscall.SyscallN(procGetExitCodeProcess.Addr(), uintptr(handle), uintptr(unsafe.Pointer(exitcode)))
|
|
2314
2314
|
if r1 == 0 {
|
|
2315
2315
|
err = errnoErr(e1)
|
|
2316
2316
|
}
|
|
@@ -2318,7 +2318,7 @@ func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
|
|
2320
2320
|
func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
|
|
2321
|
-
r1, _, e1 := syscall.
|
|
2321
|
+
r1, _, e1 := syscall.SyscallN(procGetFileAttributesExW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
|
|
2322
2322
|
if r1 == 0 {
|
|
2323
2323
|
err = errnoErr(e1)
|
|
2324
2324
|
}
|
|
@@ -2326,7 +2326,7 @@ func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
|
|
|
2326
2326
|
}
|
|
2327
2327
|
|
|
2328
2328
|
func GetFileAttributes(name *uint16) (attrs uint32, err error) {
|
|
2329
|
-
r0, _, e1 := syscall.
|
|
2329
|
+
r0, _, e1 := syscall.SyscallN(procGetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)))
|
|
2330
2330
|
attrs = uint32(r0)
|
|
2331
2331
|
if attrs == INVALID_FILE_ATTRIBUTES {
|
|
2332
2332
|
err = errnoErr(e1)
|
|
@@ -2335,7 +2335,7 @@ func GetFileAttributes(name *uint16) (attrs uint32, err error) {
|
|
|
2335
2335
|
}
|
|
2336
2336
|
|
|
2337
2337
|
func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
|
|
2338
|
-
r1, _, e1 := syscall.
|
|
2338
|
+
r1, _, e1 := syscall.SyscallN(procGetFileInformationByHandle.Addr(), uintptr(handle), uintptr(unsafe.Pointer(data)))
|
|
2339
2339
|
if r1 == 0 {
|
|
2340
2340
|
err = errnoErr(e1)
|
|
2341
2341
|
}
|
|
@@ -2343,7 +2343,7 @@ func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (e
|
|
|
2343
2343
|
}
|
|
2344
2344
|
|
|
2345
2345
|
func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
|
|
2346
|
-
r1, _, e1 := syscall.
|
|
2346
|
+
r1, _, e1 := syscall.SyscallN(procGetFileInformationByHandleEx.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen))
|
|
2347
2347
|
if r1 == 0 {
|
|
2348
2348
|
err = errnoErr(e1)
|
|
2349
2349
|
}
|
|
@@ -2351,7 +2351,7 @@ func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte,
|
|
|
2351
2351
|
}
|
|
2352
2352
|
|
|
2353
2353
|
func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
|
|
2354
|
-
r1, _, e1 := syscall.
|
|
2354
|
+
r1, _, e1 := syscall.SyscallN(procGetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)))
|
|
2355
2355
|
if r1 == 0 {
|
|
2356
2356
|
err = errnoErr(e1)
|
|
2357
2357
|
}
|
|
@@ -2359,7 +2359,7 @@ func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim
|
|
|
2359
2359
|
}
|
|
2360
2360
|
|
|
2361
2361
|
func GetFileType(filehandle Handle) (n uint32, err error) {
|
|
2362
|
-
r0, _, e1 := syscall.
|
|
2362
|
+
r0, _, e1 := syscall.SyscallN(procGetFileType.Addr(), uintptr(filehandle))
|
|
2363
2363
|
n = uint32(r0)
|
|
2364
2364
|
if n == 0 {
|
|
2365
2365
|
err = errnoErr(e1)
|
|
@@ -2368,7 +2368,7 @@ func GetFileType(filehandle Handle) (n uint32, err error) {
|
|
|
2368
2368
|
}
|
|
2369
2369
|
|
|
2370
2370
|
func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {
|
|
2371
|
-
r0, _, e1 := syscall.
|
|
2371
|
+
r0, _, e1 := syscall.SyscallN(procGetFinalPathNameByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags))
|
|
2372
2372
|
n = uint32(r0)
|
|
2373
2373
|
if n == 0 {
|
|
2374
2374
|
err = errnoErr(e1)
|
|
@@ -2377,7 +2377,7 @@ func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32
|
|
|
2377
2377
|
}
|
|
2378
2378
|
|
|
2379
2379
|
func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
|
|
2380
|
-
r0, _, e1 := syscall.
|
|
2380
|
+
r0, _, e1 := syscall.SyscallN(procGetFullPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)))
|
|
2381
2381
|
n = uint32(r0)
|
|
2382
2382
|
if n == 0 {
|
|
2383
2383
|
err = errnoErr(e1)
|
|
@@ -2386,13 +2386,13 @@ func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (
|
|
|
2386
2386
|
}
|
|
2387
2387
|
|
|
2388
2388
|
func GetLargePageMinimum() (size uintptr) {
|
|
2389
|
-
r0, _, _ := syscall.
|
|
2389
|
+
r0, _, _ := syscall.SyscallN(procGetLargePageMinimum.Addr())
|
|
2390
2390
|
size = uintptr(r0)
|
|
2391
2391
|
return
|
|
2392
2392
|
}
|
|
2393
2393
|
|
|
2394
2394
|
func GetLastError() (lasterr error) {
|
|
2395
|
-
r0, _, _ := syscall.
|
|
2395
|
+
r0, _, _ := syscall.SyscallN(procGetLastError.Addr())
|
|
2396
2396
|
if r0 != 0 {
|
|
2397
2397
|
lasterr = syscall.Errno(r0)
|
|
2398
2398
|
}
|
|
@@ -2400,7 +2400,7 @@ func GetLastError() (lasterr error) {
|
|
|
2400
2400
|
}
|
|
2401
2401
|
|
|
2402
2402
|
func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
|
|
2403
|
-
r0, _, e1 := syscall.
|
|
2403
|
+
r0, _, e1 := syscall.SyscallN(procGetLogicalDriveStringsW.Addr(), uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)))
|
|
2404
2404
|
n = uint32(r0)
|
|
2405
2405
|
if n == 0 {
|
|
2406
2406
|
err = errnoErr(e1)
|
|
@@ -2409,7 +2409,7 @@ func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err
|
|
|
2409
2409
|
}
|
|
2410
2410
|
|
|
2411
2411
|
func GetLogicalDrives() (drivesBitMask uint32, err error) {
|
|
2412
|
-
r0, _, e1 := syscall.
|
|
2412
|
+
r0, _, e1 := syscall.SyscallN(procGetLogicalDrives.Addr())
|
|
2413
2413
|
drivesBitMask = uint32(r0)
|
|
2414
2414
|
if drivesBitMask == 0 {
|
|
2415
2415
|
err = errnoErr(e1)
|
|
@@ -2418,7 +2418,7 @@ func GetLogicalDrives() (drivesBitMask uint32, err error) {
|
|
|
2418
2418
|
}
|
|
2419
2419
|
|
|
2420
2420
|
func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
|
|
2421
|
-
r0, _, e1 := syscall.
|
|
2421
|
+
r0, _, e1 := syscall.SyscallN(procGetLongPathNameW.Addr(), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
|
|
2422
2422
|
n = uint32(r0)
|
|
2423
2423
|
if n == 0 {
|
|
2424
2424
|
err = errnoErr(e1)
|
|
@@ -2427,13 +2427,13 @@ func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err er
|
|
|
2427
2427
|
}
|
|
2428
2428
|
|
|
2429
2429
|
func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) {
|
|
2430
|
-
r0, _, _ := syscall.
|
|
2430
|
+
r0, _, _ := syscall.SyscallN(procGetMaximumProcessorCount.Addr(), uintptr(groupNumber))
|
|
2431
2431
|
ret = uint32(r0)
|
|
2432
2432
|
return
|
|
2433
2433
|
}
|
|
2434
2434
|
|
|
2435
2435
|
func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
|
|
2436
|
-
r0, _, e1 := syscall.
|
|
2436
|
+
r0, _, e1 := syscall.SyscallN(procGetModuleFileNameW.Addr(), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
|
|
2437
2437
|
n = uint32(r0)
|
|
2438
2438
|
if n == 0 {
|
|
2439
2439
|
err = errnoErr(e1)
|
|
@@ -2442,7 +2442,7 @@ func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32,
|
|
|
2442
2442
|
}
|
|
2443
2443
|
|
|
2444
2444
|
func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
|
|
2445
|
-
r1, _, e1 := syscall.
|
|
2445
|
+
r1, _, e1 := syscall.SyscallN(procGetModuleHandleExW.Addr(), uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
|
|
2446
2446
|
if r1 == 0 {
|
|
2447
2447
|
err = errnoErr(e1)
|
|
2448
2448
|
}
|
|
@@ -2450,7 +2450,7 @@ func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err er
|
|
|
2450
2450
|
}
|
|
2451
2451
|
|
|
2452
2452
|
func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error) {
|
|
2453
|
-
r1, _, e1 := syscall.
|
|
2453
|
+
r1, _, e1 := syscall.SyscallN(procGetNamedPipeClientProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(clientProcessID)))
|
|
2454
2454
|
if r1 == 0 {
|
|
2455
2455
|
err = errnoErr(e1)
|
|
2456
2456
|
}
|
|
@@ -2458,7 +2458,7 @@ func GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err erro
|
|
|
2458
2458
|
}
|
|
2459
2459
|
|
|
2460
2460
|
func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
|
|
2461
|
-
r1, _, e1 := syscall.
|
|
2461
|
+
r1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize))
|
|
2462
2462
|
if r1 == 0 {
|
|
2463
2463
|
err = errnoErr(e1)
|
|
2464
2464
|
}
|
|
@@ -2466,7 +2466,7 @@ func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, m
|
|
|
2466
2466
|
}
|
|
2467
2467
|
|
|
2468
2468
|
func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
|
|
2469
|
-
r1, _, e1 := syscall.
|
|
2469
|
+
r1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)))
|
|
2470
2470
|
if r1 == 0 {
|
|
2471
2471
|
err = errnoErr(e1)
|
|
2472
2472
|
}
|
|
@@ -2474,7 +2474,7 @@ func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint3
|
|
|
2474
2474
|
}
|
|
2475
2475
|
|
|
2476
2476
|
func GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error) {
|
|
2477
|
-
r1, _, e1 := syscall.
|
|
2477
|
+
r1, _, e1 := syscall.SyscallN(procGetNamedPipeServerProcessId.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(serverProcessID)))
|
|
2478
2478
|
if r1 == 0 {
|
|
2479
2479
|
err = errnoErr(e1)
|
|
2480
2480
|
}
|
|
@@ -2486,7 +2486,7 @@ func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wa
|
|
|
2486
2486
|
if wait {
|
|
2487
2487
|
_p0 = 1
|
|
2488
2488
|
}
|
|
2489
|
-
r1, _, e1 := syscall.
|
|
2489
|
+
r1, _, e1 := syscall.SyscallN(procGetOverlappedResult.Addr(), uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0))
|
|
2490
2490
|
if r1 == 0 {
|
|
2491
2491
|
err = errnoErr(e1)
|
|
2492
2492
|
}
|
|
@@ -2494,7 +2494,7 @@ func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wa
|
|
|
2494
2494
|
}
|
|
2495
2495
|
|
|
2496
2496
|
func GetPriorityClass(process Handle) (ret uint32, err error) {
|
|
2497
|
-
r0, _, e1 := syscall.
|
|
2497
|
+
r0, _, e1 := syscall.SyscallN(procGetPriorityClass.Addr(), uintptr(process))
|
|
2498
2498
|
ret = uint32(r0)
|
|
2499
2499
|
if ret == 0 {
|
|
2500
2500
|
err = errnoErr(e1)
|
|
@@ -2512,7 +2512,7 @@ func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
|
|
|
2512
2512
|
}
|
|
2513
2513
|
|
|
2514
2514
|
func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
|
|
2515
|
-
r0, _, e1 := syscall.
|
|
2515
|
+
r0, _, e1 := syscall.SyscallN(procGetProcAddress.Addr(), uintptr(module), uintptr(unsafe.Pointer(procname)))
|
|
2516
2516
|
proc = uintptr(r0)
|
|
2517
2517
|
if proc == 0 {
|
|
2518
2518
|
err = errnoErr(e1)
|
|
@@ -2521,7 +2521,7 @@ func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
|
|
|
2521
2521
|
}
|
|
2522
2522
|
|
|
2523
2523
|
func GetProcessId(process Handle) (id uint32, err error) {
|
|
2524
|
-
r0, _, e1 := syscall.
|
|
2524
|
+
r0, _, e1 := syscall.SyscallN(procGetProcessId.Addr(), uintptr(process))
|
|
2525
2525
|
id = uint32(r0)
|
|
2526
2526
|
if id == 0 {
|
|
2527
2527
|
err = errnoErr(e1)
|
|
@@ -2530,7 +2530,7 @@ func GetProcessId(process Handle) (id uint32, err error) {
|
|
|
2530
2530
|
}
|
|
2531
2531
|
|
|
2532
2532
|
func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
|
2533
|
-
r1, _, e1 := syscall.
|
|
2533
|
+
r1, _, e1 := syscall.SyscallN(procGetProcessPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
|
|
2534
2534
|
if r1 == 0 {
|
|
2535
2535
|
err = errnoErr(e1)
|
|
2536
2536
|
}
|
|
@@ -2538,7 +2538,7 @@ func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uin
|
|
|
2538
2538
|
}
|
|
2539
2539
|
|
|
2540
2540
|
func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
|
|
2541
|
-
r1, _, e1 := syscall.
|
|
2541
|
+
r1, _, e1 := syscall.SyscallN(procGetProcessShutdownParameters.Addr(), uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)))
|
|
2542
2542
|
if r1 == 0 {
|
|
2543
2543
|
err = errnoErr(e1)
|
|
2544
2544
|
}
|
|
@@ -2546,7 +2546,7 @@ func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
|
|
|
2546
2546
|
}
|
|
2547
2547
|
|
|
2548
2548
|
func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
|
|
2549
|
-
r1, _, e1 := syscall.
|
|
2549
|
+
r1, _, e1 := syscall.SyscallN(procGetProcessTimes.Addr(), uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)))
|
|
2550
2550
|
if r1 == 0 {
|
|
2551
2551
|
err = errnoErr(e1)
|
|
2552
2552
|
}
|
|
@@ -2554,12 +2554,12 @@ func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime,
|
|
|
2554
2554
|
}
|
|
2555
2555
|
|
|
2556
2556
|
func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) {
|
|
2557
|
-
syscall.
|
|
2557
|
+
syscall.SyscallN(procGetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)))
|
|
2558
2558
|
return
|
|
2559
2559
|
}
|
|
2560
2560
|
|
|
2561
2561
|
func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) {
|
|
2562
|
-
r1, _, e1 := syscall.
|
|
2562
|
+
r1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout))
|
|
2563
2563
|
if r1 == 0 {
|
|
2564
2564
|
err = errnoErr(e1)
|
|
2565
2565
|
}
|
|
@@ -2567,7 +2567,7 @@ func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overl
|
|
|
2567
2567
|
}
|
|
2568
2568
|
|
|
2569
2569
|
func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
|
|
2570
|
-
r0, _, e1 := syscall.
|
|
2570
|
+
r0, _, e1 := syscall.SyscallN(procGetShortPathNameW.Addr(), uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
|
|
2571
2571
|
n = uint32(r0)
|
|
2572
2572
|
if n == 0 {
|
|
2573
2573
|
err = errnoErr(e1)
|
|
@@ -2576,12 +2576,12 @@ func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uin
|
|
|
2576
2576
|
}
|
|
2577
2577
|
|
|
2578
2578
|
func getStartupInfo(startupInfo *StartupInfo) {
|
|
2579
|
-
syscall.
|
|
2579
|
+
syscall.SyscallN(procGetStartupInfoW.Addr(), uintptr(unsafe.Pointer(startupInfo)))
|
|
2580
2580
|
return
|
|
2581
2581
|
}
|
|
2582
2582
|
|
|
2583
2583
|
func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
|
|
2584
|
-
r0, _, e1 := syscall.
|
|
2584
|
+
r0, _, e1 := syscall.SyscallN(procGetStdHandle.Addr(), uintptr(stdhandle))
|
|
2585
2585
|
handle = Handle(r0)
|
|
2586
2586
|
if handle == InvalidHandle {
|
|
2587
2587
|
err = errnoErr(e1)
|
|
@@ -2590,7 +2590,7 @@ func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
|
|
2592
2592
|
func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
|
|
2593
|
-
r0, _, e1 := syscall.
|
|
2593
|
+
r0, _, e1 := syscall.SyscallN(procGetSystemDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))
|
|
2594
2594
|
len = uint32(r0)
|
|
2595
2595
|
if len == 0 {
|
|
2596
2596
|
err = errnoErr(e1)
|
|
@@ -2599,7 +2599,7 @@ func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
|
|
|
2599
2599
|
}
|
|
2600
2600
|
|
|
2601
2601
|
func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
|
2602
|
-
r1, _, e1 := syscall.
|
|
2602
|
+
r1, _, e1 := syscall.SyscallN(procGetSystemPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
|
|
2603
2603
|
if r1 == 0 {
|
|
2604
2604
|
err = errnoErr(e1)
|
|
2605
2605
|
}
|
|
@@ -2607,17 +2607,17 @@ func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint
|
|
|
2607
2607
|
}
|
|
2608
2608
|
|
|
2609
2609
|
func GetSystemTimeAsFileTime(time *Filetime) {
|
|
2610
|
-
syscall.
|
|
2610
|
+
syscall.SyscallN(procGetSystemTimeAsFileTime.Addr(), uintptr(unsafe.Pointer(time)))
|
|
2611
2611
|
return
|
|
2612
2612
|
}
|
|
2613
2613
|
|
|
2614
2614
|
func GetSystemTimePreciseAsFileTime(time *Filetime) {
|
|
2615
|
-
syscall.
|
|
2615
|
+
syscall.SyscallN(procGetSystemTimePreciseAsFileTime.Addr(), uintptr(unsafe.Pointer(time)))
|
|
2616
2616
|
return
|
|
2617
2617
|
}
|
|
2618
2618
|
|
|
2619
2619
|
func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
|
|
2620
|
-
r0, _, e1 := syscall.
|
|
2620
|
+
r0, _, e1 := syscall.SyscallN(procGetSystemWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))
|
|
2621
2621
|
len = uint32(r0)
|
|
2622
2622
|
if len == 0 {
|
|
2623
2623
|
err = errnoErr(e1)
|
|
@@ -2626,7 +2626,7 @@ func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err erro
|
|
|
2626
2626
|
}
|
|
2627
2627
|
|
|
2628
2628
|
func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
|
|
2629
|
-
r0, _, e1 := syscall.
|
|
2629
|
+
r0, _, e1 := syscall.SyscallN(procGetTempPathW.Addr(), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
|
|
2630
2630
|
n = uint32(r0)
|
|
2631
2631
|
if n == 0 {
|
|
2632
2632
|
err = errnoErr(e1)
|
|
@@ -2635,7 +2635,7 @@ func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
|
|
|
2635
2635
|
}
|
|
2636
2636
|
|
|
2637
2637
|
func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
|
2638
|
-
r1, _, e1 := syscall.
|
|
2638
|
+
r1, _, e1 := syscall.SyscallN(procGetThreadPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
|
|
2639
2639
|
if r1 == 0 {
|
|
2640
2640
|
err = errnoErr(e1)
|
|
2641
2641
|
}
|
|
@@ -2643,13 +2643,13 @@ func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint
|
|
|
2643
2643
|
}
|
|
2644
2644
|
|
|
2645
2645
|
func getTickCount64() (ms uint64) {
|
|
2646
|
-
r0, _, _ := syscall.
|
|
2646
|
+
r0, _, _ := syscall.SyscallN(procGetTickCount64.Addr())
|
|
2647
2647
|
ms = uint64(r0)
|
|
2648
2648
|
return
|
|
2649
2649
|
}
|
|
2650
2650
|
|
|
2651
2651
|
func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
|
|
2652
|
-
r0, _, e1 := syscall.
|
|
2652
|
+
r0, _, e1 := syscall.SyscallN(procGetTimeZoneInformation.Addr(), uintptr(unsafe.Pointer(tzi)))
|
|
2653
2653
|
rc = uint32(r0)
|
|
2654
2654
|
if rc == 0xffffffff {
|
|
2655
2655
|
err = errnoErr(e1)
|
|
@@ -2658,7 +2658,7 @@ func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
|
|
|
2658
2658
|
}
|
|
2659
2659
|
|
|
2660
2660
|
func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
|
|
2661
|
-
r1, _, e1 := syscall.
|
|
2661
|
+
r1, _, e1 := syscall.SyscallN(procGetUserPreferredUILanguages.Addr(), uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)))
|
|
2662
2662
|
if r1 == 0 {
|
|
2663
2663
|
err = errnoErr(e1)
|
|
2664
2664
|
}
|
|
@@ -2666,7 +2666,7 @@ func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16
|
|
|
2666
2666
|
}
|
|
2667
2667
|
|
|
2668
2668
|
func GetVersion() (ver uint32, err error) {
|
|
2669
|
-
r0, _, e1 := syscall.
|
|
2669
|
+
r0, _, e1 := syscall.SyscallN(procGetVersion.Addr())
|
|
2670
2670
|
ver = uint32(r0)
|
|
2671
2671
|
if ver == 0 {
|
|
2672
2672
|
err = errnoErr(e1)
|
|
@@ -2675,7 +2675,7 @@ func GetVersion() (ver uint32, err error) {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
|
|
2677
2677
|
func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
|
|
2678
|
-
r1, _, e1 := syscall.
|
|
2678
|
+
r1, _, e1 := syscall.SyscallN(procGetVolumeInformationByHandleW.Addr(), uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize))
|
|
2679
2679
|
if r1 == 0 {
|
|
2680
2680
|
err = errnoErr(e1)
|
|
2681
2681
|
}
|
|
@@ -2683,7 +2683,7 @@ func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeN
|
|
|
2683
2683
|
}
|
|
2684
2684
|
|
|
2685
2685
|
func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
|
|
2686
|
-
r1, _, e1 := syscall.
|
|
2686
|
+
r1, _, e1 := syscall.SyscallN(procGetVolumeInformationW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize))
|
|
2687
2687
|
if r1 == 0 {
|
|
2688
2688
|
err = errnoErr(e1)
|
|
2689
2689
|
}
|
|
@@ -2691,7 +2691,7 @@ func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volume
|
|
|
2691
2691
|
}
|
|
2692
2692
|
|
|
2693
2693
|
func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {
|
|
2694
|
-
r1, _, e1 := syscall.
|
|
2694
|
+
r1, _, e1 := syscall.SyscallN(procGetVolumeNameForVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
|
|
2695
2695
|
if r1 == 0 {
|
|
2696
2696
|
err = errnoErr(e1)
|
|
2697
2697
|
}
|
|
@@ -2699,7 +2699,7 @@ func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint
|
|
|
2699
2699
|
}
|
|
2700
2700
|
|
|
2701
2701
|
func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {
|
|
2702
|
-
r1, _, e1 := syscall.
|
|
2702
|
+
r1, _, e1 := syscall.SyscallN(procGetVolumePathNameW.Addr(), uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
|
|
2703
2703
|
if r1 == 0 {
|
|
2704
2704
|
err = errnoErr(e1)
|
|
2705
2705
|
}
|
|
@@ -2707,7 +2707,7 @@ func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength ui
|
|
|
2707
2707
|
}
|
|
2708
2708
|
|
|
2709
2709
|
func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {
|
|
2710
|
-
r1, _, e1 := syscall.
|
|
2710
|
+
r1, _, e1 := syscall.SyscallN(procGetVolumePathNamesForVolumeNameW.Addr(), uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)))
|
|
2711
2711
|
if r1 == 0 {
|
|
2712
2712
|
err = errnoErr(e1)
|
|
2713
2713
|
}
|
|
@@ -2715,7 +2715,7 @@ func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16
|
|
|
2715
2715
|
}
|
|
2716
2716
|
|
|
2717
2717
|
func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
|
|
2718
|
-
r0, _, e1 := syscall.
|
|
2718
|
+
r0, _, e1 := syscall.SyscallN(procGetWindowsDirectoryW.Addr(), uintptr(unsafe.Pointer(dir)), uintptr(dirLen))
|
|
2719
2719
|
len = uint32(r0)
|
|
2720
2720
|
if len == 0 {
|
|
2721
2721
|
err = errnoErr(e1)
|
|
@@ -2724,7 +2724,7 @@ func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
|
|
|
2724
2724
|
}
|
|
2725
2725
|
|
|
2726
2726
|
func initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) {
|
|
2727
|
-
r1, _, e1 := syscall.
|
|
2727
|
+
r1, _, e1 := syscall.SyscallN(procInitializeProcThreadAttributeList.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)))
|
|
2728
2728
|
if r1 == 0 {
|
|
2729
2729
|
err = errnoErr(e1)
|
|
2730
2730
|
}
|
|
@@ -2736,7 +2736,7 @@ func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
|
|
|
2736
2736
|
if *isWow64 {
|
|
2737
2737
|
_p0 = 1
|
|
2738
2738
|
}
|
|
2739
|
-
r1, _, e1 := syscall.
|
|
2739
|
+
r1, _, e1 := syscall.SyscallN(procIsWow64Process.Addr(), uintptr(handle), uintptr(unsafe.Pointer(&_p0)))
|
|
2740
2740
|
*isWow64 = _p0 != 0
|
|
2741
2741
|
if r1 == 0 {
|
|
2742
2742
|
err = errnoErr(e1)
|
|
@@ -2749,7 +2749,7 @@ func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint1
|
|
|
2749
2749
|
if err != nil {
|
|
2750
2750
|
return
|
|
2751
2751
|
}
|
|
2752
|
-
r1, _, e1 := syscall.
|
|
2752
|
+
r1, _, e1 := syscall.SyscallN(procIsWow64Process2.Addr(), uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))
|
|
2753
2753
|
if r1 == 0 {
|
|
2754
2754
|
err = errnoErr(e1)
|
|
2755
2755
|
}
|
|
@@ -2766,7 +2766,7 @@ func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, e
|
|
|
2766
2766
|
}
|
|
2767
2767
|
|
|
2768
2768
|
func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
|
|
2769
|
-
r0, _, e1 := syscall.
|
|
2769
|
+
r0, _, e1 := syscall.SyscallN(procLoadLibraryExW.Addr(), uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
|
|
2770
2770
|
handle = Handle(r0)
|
|
2771
2771
|
if handle == 0 {
|
|
2772
2772
|
err = errnoErr(e1)
|
|
@@ -2784,7 +2784,7 @@ func LoadLibrary(libname string) (handle Handle, err error) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
|
|
2786
2786
|
func _LoadLibrary(libname *uint16) (handle Handle, err error) {
|
|
2787
|
-
r0, _, e1 := syscall.
|
|
2787
|
+
r0, _, e1 := syscall.SyscallN(procLoadLibraryW.Addr(), uintptr(unsafe.Pointer(libname)))
|
|
2788
2788
|
handle = Handle(r0)
|
|
2789
2789
|
if handle == 0 {
|
|
2790
2790
|
err = errnoErr(e1)
|
|
@@ -2793,7 +2793,7 @@ func _LoadLibrary(libname *uint16) (handle Handle, err error) {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
|
|
2795
2795
|
func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {
|
|
2796
|
-
r0, _, e1 := syscall.
|
|
2796
|
+
r0, _, e1 := syscall.SyscallN(procLoadResource.Addr(), uintptr(module), uintptr(resInfo))
|
|
2797
2797
|
resData = Handle(r0)
|
|
2798
2798
|
if resData == 0 {
|
|
2799
2799
|
err = errnoErr(e1)
|
|
@@ -2802,7 +2802,7 @@ func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {
|
|
|
2802
2802
|
}
|
|
2803
2803
|
|
|
2804
2804
|
func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {
|
|
2805
|
-
r0, _, e1 := syscall.
|
|
2805
|
+
r0, _, e1 := syscall.SyscallN(procLocalAlloc.Addr(), uintptr(flags), uintptr(length))
|
|
2806
2806
|
ptr = uintptr(r0)
|
|
2807
2807
|
if ptr == 0 {
|
|
2808
2808
|
err = errnoErr(e1)
|
|
@@ -2811,7 +2811,7 @@ func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
|
|
2813
2813
|
func LocalFree(hmem Handle) (handle Handle, err error) {
|
|
2814
|
-
r0, _, e1 := syscall.
|
|
2814
|
+
r0, _, e1 := syscall.SyscallN(procLocalFree.Addr(), uintptr(hmem))
|
|
2815
2815
|
handle = Handle(r0)
|
|
2816
2816
|
if handle != 0 {
|
|
2817
2817
|
err = errnoErr(e1)
|
|
@@ -2820,7 +2820,7 @@ func LocalFree(hmem Handle) (handle Handle, err error) {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
|
|
2822
2822
|
func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
|
|
2823
|
-
r1, _, e1 := syscall.
|
|
2823
|
+
r1, _, e1 := syscall.SyscallN(procLockFileEx.Addr(), uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
|
|
2824
2824
|
if r1 == 0 {
|
|
2825
2825
|
err = errnoErr(e1)
|
|
2826
2826
|
}
|
|
@@ -2828,7 +2828,7 @@ func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, byt
|
|
|
2828
2828
|
}
|
|
2829
2829
|
|
|
2830
2830
|
func LockResource(resData Handle) (addr uintptr, err error) {
|
|
2831
|
-
r0, _, e1 := syscall.
|
|
2831
|
+
r0, _, e1 := syscall.SyscallN(procLockResource.Addr(), uintptr(resData))
|
|
2832
2832
|
addr = uintptr(r0)
|
|
2833
2833
|
if addr == 0 {
|
|
2834
2834
|
err = errnoErr(e1)
|
|
@@ -2837,7 +2837,7 @@ func LockResource(resData Handle) (addr uintptr, err error) {
|
|
|
2837
2837
|
}
|
|
2838
2838
|
|
|
2839
2839
|
func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
|
|
2840
|
-
r0, _, e1 := syscall.
|
|
2840
|
+
r0, _, e1 := syscall.SyscallN(procMapViewOfFile.Addr(), uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length))
|
|
2841
2841
|
addr = uintptr(r0)
|
|
2842
2842
|
if addr == 0 {
|
|
2843
2843
|
err = errnoErr(e1)
|
|
@@ -2846,7 +2846,7 @@ func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow ui
|
|
|
2846
2846
|
}
|
|
2847
2847
|
|
|
2848
2848
|
func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
|
2849
|
-
r1, _, e1 := syscall.
|
|
2849
|
+
r1, _, e1 := syscall.SyscallN(procModule32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)))
|
|
2850
2850
|
if r1 == 0 {
|
|
2851
2851
|
err = errnoErr(e1)
|
|
2852
2852
|
}
|
|
@@ -2854,7 +2854,7 @@ func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
|
|
2856
2856
|
func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
|
2857
|
-
r1, _, e1 := syscall.
|
|
2857
|
+
r1, _, e1 := syscall.SyscallN(procModule32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)))
|
|
2858
2858
|
if r1 == 0 {
|
|
2859
2859
|
err = errnoErr(e1)
|
|
2860
2860
|
}
|
|
@@ -2862,7 +2862,7 @@ func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
|
|
|
2862
2862
|
}
|
|
2863
2863
|
|
|
2864
2864
|
func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
|
|
2865
|
-
r1, _, e1 := syscall.
|
|
2865
|
+
r1, _, e1 := syscall.SyscallN(procMoveFileExW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
|
|
2866
2866
|
if r1 == 0 {
|
|
2867
2867
|
err = errnoErr(e1)
|
|
2868
2868
|
}
|
|
@@ -2870,7 +2870,7 @@ func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
|
|
|
2870
2870
|
}
|
|
2871
2871
|
|
|
2872
2872
|
func MoveFile(from *uint16, to *uint16) (err error) {
|
|
2873
|
-
r1, _, e1 := syscall.
|
|
2873
|
+
r1, _, e1 := syscall.SyscallN(procMoveFileW.Addr(), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)))
|
|
2874
2874
|
if r1 == 0 {
|
|
2875
2875
|
err = errnoErr(e1)
|
|
2876
2876
|
}
|
|
@@ -2878,7 +2878,7 @@ func MoveFile(from *uint16, to *uint16) (err error) {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
|
|
2880
2880
|
func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
|
|
2881
|
-
r0, _, e1 := syscall.
|
|
2881
|
+
r0, _, e1 := syscall.SyscallN(procMultiByteToWideChar.Addr(), uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
|
|
2882
2882
|
nwrite = int32(r0)
|
|
2883
2883
|
if nwrite == 0 {
|
|
2884
2884
|
err = errnoErr(e1)
|
|
@@ -2891,7 +2891,7 @@ func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H
|
|
|
2891
2891
|
if inheritHandle {
|
|
2892
2892
|
_p0 = 1
|
|
2893
2893
|
}
|
|
2894
|
-
r0, _, e1 := syscall.
|
|
2894
|
+
r0, _, e1 := syscall.SyscallN(procOpenEventW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
|
|
2895
2895
|
handle = Handle(r0)
|
|
2896
2896
|
if handle == 0 {
|
|
2897
2897
|
err = errnoErr(e1)
|
|
@@ -2904,7 +2904,7 @@ func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle H
|
|
|
2904
2904
|
if inheritHandle {
|
|
2905
2905
|
_p0 = 1
|
|
2906
2906
|
}
|
|
2907
|
-
r0, _, e1 := syscall.
|
|
2907
|
+
r0, _, e1 := syscall.SyscallN(procOpenMutexW.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
|
|
2908
2908
|
handle = Handle(r0)
|
|
2909
2909
|
if handle == 0 {
|
|
2910
2910
|
err = errnoErr(e1)
|
|
@@ -2917,7 +2917,7 @@ func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (ha
|
|
|
2917
2917
|
if inheritHandle {
|
|
2918
2918
|
_p0 = 1
|
|
2919
2919
|
}
|
|
2920
|
-
r0, _, e1 := syscall.
|
|
2920
|
+
r0, _, e1 := syscall.SyscallN(procOpenProcess.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
|
|
2921
2921
|
handle = Handle(r0)
|
|
2922
2922
|
if handle == 0 {
|
|
2923
2923
|
err = errnoErr(e1)
|
|
@@ -2930,7 +2930,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand
|
|
|
2930
2930
|
if inheritHandle {
|
|
2931
2931
|
_p0 = 1
|
|
2932
2932
|
}
|
|
2933
|
-
r0, _, e1 := syscall.
|
|
2933
|
+
r0, _, e1 := syscall.SyscallN(procOpenThread.Addr(), uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
|
|
2934
2934
|
handle = Handle(r0)
|
|
2935
2935
|
if handle == 0 {
|
|
2936
2936
|
err = errnoErr(e1)
|
|
@@ -2939,7 +2939,7 @@ func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (hand
|
|
|
2939
2939
|
}
|
|
2940
2940
|
|
|
2941
2941
|
func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) {
|
|
2942
|
-
r1, _, e1 := syscall.
|
|
2942
|
+
r1, _, e1 := syscall.SyscallN(procPostQueuedCompletionStatus.Addr(), uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)))
|
|
2943
2943
|
if r1 == 0 {
|
|
2944
2944
|
err = errnoErr(e1)
|
|
2945
2945
|
}
|
|
@@ -2947,7 +2947,7 @@ func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overla
|
|
|
2947
2947
|
}
|
|
2948
2948
|
|
|
2949
2949
|
func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
|
|
2950
|
-
r1, _, e1 := syscall.
|
|
2950
|
+
r1, _, e1 := syscall.SyscallN(procProcess32FirstW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)))
|
|
2951
2951
|
if r1 == 0 {
|
|
2952
2952
|
err = errnoErr(e1)
|
|
2953
2953
|
}
|
|
@@ -2955,7 +2955,7 @@ func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
|
|
|
2955
2955
|
}
|
|
2956
2956
|
|
|
2957
2957
|
func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
|
|
2958
|
-
r1, _, e1 := syscall.
|
|
2958
|
+
r1, _, e1 := syscall.SyscallN(procProcess32NextW.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)))
|
|
2959
2959
|
if r1 == 0 {
|
|
2960
2960
|
err = errnoErr(e1)
|
|
2961
2961
|
}
|
|
@@ -2963,7 +2963,7 @@ func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
|
|
|
2963
2963
|
}
|
|
2964
2964
|
|
|
2965
2965
|
func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {
|
|
2966
|
-
r1, _, e1 := syscall.
|
|
2966
|
+
r1, _, e1 := syscall.SyscallN(procProcessIdToSessionId.Addr(), uintptr(pid), uintptr(unsafe.Pointer(sessionid)))
|
|
2967
2967
|
if r1 == 0 {
|
|
2968
2968
|
err = errnoErr(e1)
|
|
2969
2969
|
}
|
|
@@ -2971,7 +2971,7 @@ func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
|
|
2973
2973
|
func PulseEvent(event Handle) (err error) {
|
|
2974
|
-
r1, _, e1 := syscall.
|
|
2974
|
+
r1, _, e1 := syscall.SyscallN(procPulseEvent.Addr(), uintptr(event))
|
|
2975
2975
|
if r1 == 0 {
|
|
2976
2976
|
err = errnoErr(e1)
|
|
2977
2977
|
}
|
|
@@ -2979,7 +2979,7 @@ func PulseEvent(event Handle) (err error) {
|
|
|
2979
2979
|
}
|
|
2980
2980
|
|
|
2981
2981
|
func PurgeComm(handle Handle, dwFlags uint32) (err error) {
|
|
2982
|
-
r1, _, e1 := syscall.
|
|
2982
|
+
r1, _, e1 := syscall.SyscallN(procPurgeComm.Addr(), uintptr(handle), uintptr(dwFlags))
|
|
2983
2983
|
if r1 == 0 {
|
|
2984
2984
|
err = errnoErr(e1)
|
|
2985
2985
|
}
|
|
@@ -2987,7 +2987,7 @@ func PurgeComm(handle Handle, dwFlags uint32) (err error) {
|
|
|
2987
2987
|
}
|
|
2988
2988
|
|
|
2989
2989
|
func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
|
|
2990
|
-
r0, _, e1 := syscall.
|
|
2990
|
+
r0, _, e1 := syscall.SyscallN(procQueryDosDeviceW.Addr(), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
|
|
2991
2991
|
n = uint32(r0)
|
|
2992
2992
|
if n == 0 {
|
|
2993
2993
|
err = errnoErr(e1)
|
|
@@ -2996,7 +2996,7 @@ func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint3
|
|
|
2996
2996
|
}
|
|
2997
2997
|
|
|
2998
2998
|
func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) {
|
|
2999
|
-
r1, _, e1 := syscall.
|
|
2999
|
+
r1, _, e1 := syscall.SyscallN(procQueryFullProcessImageNameW.Addr(), uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)))
|
|
3000
3000
|
if r1 == 0 {
|
|
3001
3001
|
err = errnoErr(e1)
|
|
3002
3002
|
}
|
|
@@ -3004,7 +3004,7 @@ func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size
|
|
|
3004
3004
|
}
|
|
3005
3005
|
|
|
3006
3006
|
func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) {
|
|
3007
|
-
r1, _, e1 := syscall.
|
|
3007
|
+
r1, _, e1 := syscall.SyscallN(procQueryInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)))
|
|
3008
3008
|
if r1 == 0 {
|
|
3009
3009
|
err = errnoErr(e1)
|
|
3010
3010
|
}
|
|
@@ -3012,7 +3012,7 @@ func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobO
|
|
|
3012
3012
|
}
|
|
3013
3013
|
|
|
3014
3014
|
func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
|
|
3015
|
-
r1, _, e1 := syscall.
|
|
3015
|
+
r1, _, e1 := syscall.SyscallN(procReadConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)))
|
|
3016
3016
|
if r1 == 0 {
|
|
3017
3017
|
err = errnoErr(e1)
|
|
3018
3018
|
}
|
|
@@ -3024,7 +3024,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree
|
|
|
3024
3024
|
if watchSubTree {
|
|
3025
3025
|
_p0 = 1
|
|
3026
3026
|
}
|
|
3027
|
-
r1, _, e1 := syscall.
|
|
3027
|
+
r1, _, e1 := syscall.SyscallN(procReadDirectoryChangesW.Addr(), uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
|
|
3028
3028
|
if r1 == 0 {
|
|
3029
3029
|
err = errnoErr(e1)
|
|
3030
3030
|
}
|
|
@@ -3036,7 +3036,7 @@ func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (
|
|
|
3036
3036
|
if len(buf) > 0 {
|
|
3037
3037
|
_p0 = &buf[0]
|
|
3038
3038
|
}
|
|
3039
|
-
r1, _, e1 := syscall.
|
|
3039
|
+
r1, _, e1 := syscall.SyscallN(procReadFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)))
|
|
3040
3040
|
if r1 == 0 {
|
|
3041
3041
|
err = errnoErr(e1)
|
|
3042
3042
|
}
|
|
@@ -3044,7 +3044,7 @@ func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (
|
|
|
3044
3044
|
}
|
|
3045
3045
|
|
|
3046
3046
|
func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) {
|
|
3047
|
-
r1, _, e1 := syscall.
|
|
3047
|
+
r1, _, e1 := syscall.SyscallN(procReadProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)))
|
|
3048
3048
|
if r1 == 0 {
|
|
3049
3049
|
err = errnoErr(e1)
|
|
3050
3050
|
}
|
|
@@ -3052,7 +3052,7 @@ func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size u
|
|
|
3052
3052
|
}
|
|
3053
3053
|
|
|
3054
3054
|
func ReleaseMutex(mutex Handle) (err error) {
|
|
3055
|
-
r1, _, e1 := syscall.
|
|
3055
|
+
r1, _, e1 := syscall.SyscallN(procReleaseMutex.Addr(), uintptr(mutex))
|
|
3056
3056
|
if r1 == 0 {
|
|
3057
3057
|
err = errnoErr(e1)
|
|
3058
3058
|
}
|
|
@@ -3060,7 +3060,7 @@ func ReleaseMutex(mutex Handle) (err error) {
|
|
|
3060
3060
|
}
|
|
3061
3061
|
|
|
3062
3062
|
func RemoveDirectory(path *uint16) (err error) {
|
|
3063
|
-
r1, _, e1 := syscall.
|
|
3063
|
+
r1, _, e1 := syscall.SyscallN(procRemoveDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))
|
|
3064
3064
|
if r1 == 0 {
|
|
3065
3065
|
err = errnoErr(e1)
|
|
3066
3066
|
}
|
|
@@ -3068,7 +3068,7 @@ func RemoveDirectory(path *uint16) (err error) {
|
|
|
3068
3068
|
}
|
|
3069
3069
|
|
|
3070
3070
|
func RemoveDllDirectory(cookie uintptr) (err error) {
|
|
3071
|
-
r1, _, e1 := syscall.
|
|
3071
|
+
r1, _, e1 := syscall.SyscallN(procRemoveDllDirectory.Addr(), uintptr(cookie))
|
|
3072
3072
|
if r1 == 0 {
|
|
3073
3073
|
err = errnoErr(e1)
|
|
3074
3074
|
}
|
|
@@ -3076,7 +3076,7 @@ func RemoveDllDirectory(cookie uintptr) (err error) {
|
|
|
3076
3076
|
}
|
|
3077
3077
|
|
|
3078
3078
|
func ResetEvent(event Handle) (err error) {
|
|
3079
|
-
r1, _, e1 := syscall.
|
|
3079
|
+
r1, _, e1 := syscall.SyscallN(procResetEvent.Addr(), uintptr(event))
|
|
3080
3080
|
if r1 == 0 {
|
|
3081
3081
|
err = errnoErr(e1)
|
|
3082
3082
|
}
|
|
@@ -3084,7 +3084,7 @@ func ResetEvent(event Handle) (err error) {
|
|
|
3084
3084
|
}
|
|
3085
3085
|
|
|
3086
3086
|
func resizePseudoConsole(pconsole Handle, size uint32) (hr error) {
|
|
3087
|
-
r0, _, _ := syscall.
|
|
3087
|
+
r0, _, _ := syscall.SyscallN(procResizePseudoConsole.Addr(), uintptr(pconsole), uintptr(size))
|
|
3088
3088
|
if r0 != 0 {
|
|
3089
3089
|
hr = syscall.Errno(r0)
|
|
3090
3090
|
}
|
|
@@ -3092,7 +3092,7 @@ func resizePseudoConsole(pconsole Handle, size uint32) (hr error) {
|
|
|
3092
3092
|
}
|
|
3093
3093
|
|
|
3094
3094
|
func ResumeThread(thread Handle) (ret uint32, err error) {
|
|
3095
|
-
r0, _, e1 := syscall.
|
|
3095
|
+
r0, _, e1 := syscall.SyscallN(procResumeThread.Addr(), uintptr(thread))
|
|
3096
3096
|
ret = uint32(r0)
|
|
3097
3097
|
if ret == 0xffffffff {
|
|
3098
3098
|
err = errnoErr(e1)
|
|
@@ -3101,7 +3101,7 @@ func ResumeThread(thread Handle) (ret uint32, err error) {
|
|
|
3101
3101
|
}
|
|
3102
3102
|
|
|
3103
3103
|
func SetCommBreak(handle Handle) (err error) {
|
|
3104
|
-
r1, _, e1 := syscall.
|
|
3104
|
+
r1, _, e1 := syscall.SyscallN(procSetCommBreak.Addr(), uintptr(handle))
|
|
3105
3105
|
if r1 == 0 {
|
|
3106
3106
|
err = errnoErr(e1)
|
|
3107
3107
|
}
|
|
@@ -3109,7 +3109,7 @@ func SetCommBreak(handle Handle) (err error) {
|
|
|
3109
3109
|
}
|
|
3110
3110
|
|
|
3111
3111
|
func SetCommMask(handle Handle, dwEvtMask uint32) (err error) {
|
|
3112
|
-
r1, _, e1 := syscall.
|
|
3112
|
+
r1, _, e1 := syscall.SyscallN(procSetCommMask.Addr(), uintptr(handle), uintptr(dwEvtMask))
|
|
3113
3113
|
if r1 == 0 {
|
|
3114
3114
|
err = errnoErr(e1)
|
|
3115
3115
|
}
|
|
@@ -3117,7 +3117,7 @@ func SetCommMask(handle Handle, dwEvtMask uint32) (err error) {
|
|
|
3117
3117
|
}
|
|
3118
3118
|
|
|
3119
3119
|
func SetCommState(handle Handle, lpDCB *DCB) (err error) {
|
|
3120
|
-
r1, _, e1 := syscall.
|
|
3120
|
+
r1, _, e1 := syscall.SyscallN(procSetCommState.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpDCB)))
|
|
3121
3121
|
if r1 == 0 {
|
|
3122
3122
|
err = errnoErr(e1)
|
|
3123
3123
|
}
|
|
@@ -3125,7 +3125,7 @@ func SetCommState(handle Handle, lpDCB *DCB) (err error) {
|
|
|
3125
3125
|
}
|
|
3126
3126
|
|
|
3127
3127
|
func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
|
|
3128
|
-
r1, _, e1 := syscall.
|
|
3128
|
+
r1, _, e1 := syscall.SyscallN(procSetCommTimeouts.Addr(), uintptr(handle), uintptr(unsafe.Pointer(timeouts)))
|
|
3129
3129
|
if r1 == 0 {
|
|
3130
3130
|
err = errnoErr(e1)
|
|
3131
3131
|
}
|
|
@@ -3133,7 +3133,7 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
|
|
|
3133
3133
|
}
|
|
3134
3134
|
|
|
3135
3135
|
func SetConsoleCP(cp uint32) (err error) {
|
|
3136
|
-
r1, _, e1 := syscall.
|
|
3136
|
+
r1, _, e1 := syscall.SyscallN(procSetConsoleCP.Addr(), uintptr(cp))
|
|
3137
3137
|
if r1 == 0 {
|
|
3138
3138
|
err = errnoErr(e1)
|
|
3139
3139
|
}
|
|
@@ -3141,7 +3141,7 @@ func SetConsoleCP(cp uint32) (err error) {
|
|
|
3141
3141
|
}
|
|
3142
3142
|
|
|
3143
3143
|
func setConsoleCursorPosition(console Handle, position uint32) (err error) {
|
|
3144
|
-
r1, _, e1 := syscall.
|
|
3144
|
+
r1, _, e1 := syscall.SyscallN(procSetConsoleCursorPosition.Addr(), uintptr(console), uintptr(position))
|
|
3145
3145
|
if r1 == 0 {
|
|
3146
3146
|
err = errnoErr(e1)
|
|
3147
3147
|
}
|
|
@@ -3149,7 +3149,7 @@ func setConsoleCursorPosition(console Handle, position uint32) (err error) {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
|
|
3151
3151
|
func SetConsoleMode(console Handle, mode uint32) (err error) {
|
|
3152
|
-
r1, _, e1 := syscall.
|
|
3152
|
+
r1, _, e1 := syscall.SyscallN(procSetConsoleMode.Addr(), uintptr(console), uintptr(mode))
|
|
3153
3153
|
if r1 == 0 {
|
|
3154
3154
|
err = errnoErr(e1)
|
|
3155
3155
|
}
|
|
@@ -3157,7 +3157,7 @@ func SetConsoleMode(console Handle, mode uint32) (err error) {
|
|
|
3157
3157
|
}
|
|
3158
3158
|
|
|
3159
3159
|
func SetConsoleOutputCP(cp uint32) (err error) {
|
|
3160
|
-
r1, _, e1 := syscall.
|
|
3160
|
+
r1, _, e1 := syscall.SyscallN(procSetConsoleOutputCP.Addr(), uintptr(cp))
|
|
3161
3161
|
if r1 == 0 {
|
|
3162
3162
|
err = errnoErr(e1)
|
|
3163
3163
|
}
|
|
@@ -3165,7 +3165,7 @@ func SetConsoleOutputCP(cp uint32) (err error) {
|
|
|
3165
3165
|
}
|
|
3166
3166
|
|
|
3167
3167
|
func SetCurrentDirectory(path *uint16) (err error) {
|
|
3168
|
-
r1, _, e1 := syscall.
|
|
3168
|
+
r1, _, e1 := syscall.SyscallN(procSetCurrentDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))
|
|
3169
3169
|
if r1 == 0 {
|
|
3170
3170
|
err = errnoErr(e1)
|
|
3171
3171
|
}
|
|
@@ -3173,7 +3173,7 @@ func SetCurrentDirectory(path *uint16) (err error) {
|
|
|
3173
3173
|
}
|
|
3174
3174
|
|
|
3175
3175
|
func SetDefaultDllDirectories(directoryFlags uint32) (err error) {
|
|
3176
|
-
r1, _, e1 := syscall.
|
|
3176
|
+
r1, _, e1 := syscall.SyscallN(procSetDefaultDllDirectories.Addr(), uintptr(directoryFlags))
|
|
3177
3177
|
if r1 == 0 {
|
|
3178
3178
|
err = errnoErr(e1)
|
|
3179
3179
|
}
|
|
@@ -3190,7 +3190,7 @@ func SetDllDirectory(path string) (err error) {
|
|
|
3190
3190
|
}
|
|
3191
3191
|
|
|
3192
3192
|
func _SetDllDirectory(path *uint16) (err error) {
|
|
3193
|
-
r1, _, e1 := syscall.
|
|
3193
|
+
r1, _, e1 := syscall.SyscallN(procSetDllDirectoryW.Addr(), uintptr(unsafe.Pointer(path)))
|
|
3194
3194
|
if r1 == 0 {
|
|
3195
3195
|
err = errnoErr(e1)
|
|
3196
3196
|
}
|
|
@@ -3198,7 +3198,7 @@ func _SetDllDirectory(path *uint16) (err error) {
|
|
|
3198
3198
|
}
|
|
3199
3199
|
|
|
3200
3200
|
func SetEndOfFile(handle Handle) (err error) {
|
|
3201
|
-
r1, _, e1 := syscall.
|
|
3201
|
+
r1, _, e1 := syscall.SyscallN(procSetEndOfFile.Addr(), uintptr(handle))
|
|
3202
3202
|
if r1 == 0 {
|
|
3203
3203
|
err = errnoErr(e1)
|
|
3204
3204
|
}
|
|
@@ -3206,7 +3206,7 @@ func SetEndOfFile(handle Handle) (err error) {
|
|
|
3206
3206
|
}
|
|
3207
3207
|
|
|
3208
3208
|
func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
|
|
3209
|
-
r1, _, e1 := syscall.
|
|
3209
|
+
r1, _, e1 := syscall.SyscallN(procSetEnvironmentVariableW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)))
|
|
3210
3210
|
if r1 == 0 {
|
|
3211
3211
|
err = errnoErr(e1)
|
|
3212
3212
|
}
|
|
@@ -3214,13 +3214,13 @@ func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
|
|
|
3214
3214
|
}
|
|
3215
3215
|
|
|
3216
3216
|
func SetErrorMode(mode uint32) (ret uint32) {
|
|
3217
|
-
r0, _, _ := syscall.
|
|
3217
|
+
r0, _, _ := syscall.SyscallN(procSetErrorMode.Addr(), uintptr(mode))
|
|
3218
3218
|
ret = uint32(r0)
|
|
3219
3219
|
return
|
|
3220
3220
|
}
|
|
3221
3221
|
|
|
3222
3222
|
func SetEvent(event Handle) (err error) {
|
|
3223
|
-
r1, _, e1 := syscall.
|
|
3223
|
+
r1, _, e1 := syscall.SyscallN(procSetEvent.Addr(), uintptr(event))
|
|
3224
3224
|
if r1 == 0 {
|
|
3225
3225
|
err = errnoErr(e1)
|
|
3226
3226
|
}
|
|
@@ -3228,7 +3228,7 @@ func SetEvent(event Handle) (err error) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
|
|
3230
3230
|
func SetFileAttributes(name *uint16, attrs uint32) (err error) {
|
|
3231
|
-
r1, _, e1 := syscall.
|
|
3231
|
+
r1, _, e1 := syscall.SyscallN(procSetFileAttributesW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(attrs))
|
|
3232
3232
|
if r1 == 0 {
|
|
3233
3233
|
err = errnoErr(e1)
|
|
3234
3234
|
}
|
|
@@ -3236,7 +3236,7 @@ func SetFileAttributes(name *uint16, attrs uint32) (err error) {
|
|
|
3236
3236
|
}
|
|
3237
3237
|
|
|
3238
3238
|
func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
|
|
3239
|
-
r1, _, e1 := syscall.
|
|
3239
|
+
r1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(handle), uintptr(flags))
|
|
3240
3240
|
if r1 == 0 {
|
|
3241
3241
|
err = errnoErr(e1)
|
|
3242
3242
|
}
|
|
@@ -3244,7 +3244,7 @@ func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error)
|
|
|
3244
3244
|
}
|
|
3245
3245
|
|
|
3246
3246
|
func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) {
|
|
3247
|
-
r1, _, e1 := syscall.
|
|
3247
|
+
r1, _, e1 := syscall.SyscallN(procSetFileInformationByHandle.Addr(), uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen))
|
|
3248
3248
|
if r1 == 0 {
|
|
3249
3249
|
err = errnoErr(e1)
|
|
3250
3250
|
}
|
|
@@ -3252,7 +3252,7 @@ func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inB
|
|
|
3252
3252
|
}
|
|
3253
3253
|
|
|
3254
3254
|
func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
|
|
3255
|
-
r0, _, e1 := syscall.
|
|
3255
|
+
r0, _, e1 := syscall.SyscallN(procSetFilePointer.Addr(), uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence))
|
|
3256
3256
|
newlowoffset = uint32(r0)
|
|
3257
3257
|
if newlowoffset == 0xffffffff {
|
|
3258
3258
|
err = errnoErr(e1)
|
|
@@ -3261,7 +3261,7 @@ func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence
|
|
|
3261
3261
|
}
|
|
3262
3262
|
|
|
3263
3263
|
func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
|
|
3264
|
-
r1, _, e1 := syscall.
|
|
3264
|
+
r1, _, e1 := syscall.SyscallN(procSetFileTime.Addr(), uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)))
|
|
3265
3265
|
if r1 == 0 {
|
|
3266
3266
|
err = errnoErr(e1)
|
|
3267
3267
|
}
|
|
@@ -3269,7 +3269,7 @@ func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetim
|
|
|
3269
3269
|
}
|
|
3270
3270
|
|
|
3271
3271
|
func SetFileValidData(handle Handle, validDataLength int64) (err error) {
|
|
3272
|
-
r1, _, e1 := syscall.
|
|
3272
|
+
r1, _, e1 := syscall.SyscallN(procSetFileValidData.Addr(), uintptr(handle), uintptr(validDataLength))
|
|
3273
3273
|
if r1 == 0 {
|
|
3274
3274
|
err = errnoErr(e1)
|
|
3275
3275
|
}
|
|
@@ -3277,7 +3277,7 @@ func SetFileValidData(handle Handle, validDataLength int64) (err error) {
|
|
|
3277
3277
|
}
|
|
3278
3278
|
|
|
3279
3279
|
func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
|
|
3280
|
-
r1, _, e1 := syscall.
|
|
3280
|
+
r1, _, e1 := syscall.SyscallN(procSetHandleInformation.Addr(), uintptr(handle), uintptr(mask), uintptr(flags))
|
|
3281
3281
|
if r1 == 0 {
|
|
3282
3282
|
err = errnoErr(e1)
|
|
3283
3283
|
}
|
|
@@ -3285,7 +3285,7 @@ func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
|
|
|
3285
3285
|
}
|
|
3286
3286
|
|
|
3287
3287
|
func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {
|
|
3288
|
-
r0, _, e1 := syscall.
|
|
3288
|
+
r0, _, e1 := syscall.SyscallN(procSetInformationJobObject.Addr(), uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength))
|
|
3289
3289
|
ret = int(r0)
|
|
3290
3290
|
if ret == 0 {
|
|
3291
3291
|
err = errnoErr(e1)
|
|
@@ -3294,7 +3294,7 @@ func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobOb
|
|
|
3294
3294
|
}
|
|
3295
3295
|
|
|
3296
3296
|
func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) {
|
|
3297
|
-
r1, _, e1 := syscall.
|
|
3297
|
+
r1, _, e1 := syscall.SyscallN(procSetNamedPipeHandleState.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)))
|
|
3298
3298
|
if r1 == 0 {
|
|
3299
3299
|
err = errnoErr(e1)
|
|
3300
3300
|
}
|
|
@@ -3302,7 +3302,7 @@ func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uin
|
|
|
3302
3302
|
}
|
|
3303
3303
|
|
|
3304
3304
|
func SetPriorityClass(process Handle, priorityClass uint32) (err error) {
|
|
3305
|
-
r1, _, e1 := syscall.
|
|
3305
|
+
r1, _, e1 := syscall.SyscallN(procSetPriorityClass.Addr(), uintptr(process), uintptr(priorityClass))
|
|
3306
3306
|
if r1 == 0 {
|
|
3307
3307
|
err = errnoErr(e1)
|
|
3308
3308
|
}
|
|
@@ -3314,7 +3314,7 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
|
|
|
3314
3314
|
if disable {
|
|
3315
3315
|
_p0 = 1
|
|
3316
3316
|
}
|
|
3317
|
-
r1, _, e1 := syscall.
|
|
3317
|
+
r1, _, e1 := syscall.SyscallN(procSetProcessPriorityBoost.Addr(), uintptr(process), uintptr(_p0))
|
|
3318
3318
|
if r1 == 0 {
|
|
3319
3319
|
err = errnoErr(e1)
|
|
3320
3320
|
}
|
|
@@ -3322,7 +3322,7 @@ func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
|
|
3324
3324
|
func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
|
|
3325
|
-
r1, _, e1 := syscall.
|
|
3325
|
+
r1, _, e1 := syscall.SyscallN(procSetProcessShutdownParameters.Addr(), uintptr(level), uintptr(flags))
|
|
3326
3326
|
if r1 == 0 {
|
|
3327
3327
|
err = errnoErr(e1)
|
|
3328
3328
|
}
|
|
@@ -3330,7 +3330,7 @@ func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
|
|
|
3330
3330
|
}
|
|
3331
3331
|
|
|
3332
3332
|
func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) {
|
|
3333
|
-
r1, _, e1 := syscall.
|
|
3333
|
+
r1, _, e1 := syscall.SyscallN(procSetProcessWorkingSetSizeEx.Addr(), uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags))
|
|
3334
3334
|
if r1 == 0 {
|
|
3335
3335
|
err = errnoErr(e1)
|
|
3336
3336
|
}
|
|
@@ -3338,7 +3338,7 @@ func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr
|
|
|
3338
3338
|
}
|
|
3339
3339
|
|
|
3340
3340
|
func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
|
|
3341
|
-
r1, _, e1 := syscall.
|
|
3341
|
+
r1, _, e1 := syscall.SyscallN(procSetStdHandle.Addr(), uintptr(stdhandle), uintptr(handle))
|
|
3342
3342
|
if r1 == 0 {
|
|
3343
3343
|
err = errnoErr(e1)
|
|
3344
3344
|
}
|
|
@@ -3346,7 +3346,7 @@ func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
|
|
|
3346
3346
|
}
|
|
3347
3347
|
|
|
3348
3348
|
func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
|
|
3349
|
-
r1, _, e1 := syscall.
|
|
3349
|
+
r1, _, e1 := syscall.SyscallN(procSetVolumeLabelW.Addr(), uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)))
|
|
3350
3350
|
if r1 == 0 {
|
|
3351
3351
|
err = errnoErr(e1)
|
|
3352
3352
|
}
|
|
@@ -3354,7 +3354,7 @@ func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
|
|
|
3354
3354
|
}
|
|
3355
3355
|
|
|
3356
3356
|
func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
|
|
3357
|
-
r1, _, e1 := syscall.
|
|
3357
|
+
r1, _, e1 := syscall.SyscallN(procSetVolumeMountPointW.Addr(), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)))
|
|
3358
3358
|
if r1 == 0 {
|
|
3359
3359
|
err = errnoErr(e1)
|
|
3360
3360
|
}
|
|
@@ -3362,7 +3362,7 @@ func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err erro
|
|
|
3362
3362
|
}
|
|
3363
3363
|
|
|
3364
3364
|
func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) {
|
|
3365
|
-
r1, _, e1 := syscall.
|
|
3365
|
+
r1, _, e1 := syscall.SyscallN(procSetupComm.Addr(), uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue))
|
|
3366
3366
|
if r1 == 0 {
|
|
3367
3367
|
err = errnoErr(e1)
|
|
3368
3368
|
}
|
|
@@ -3370,7 +3370,7 @@ func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) {
|
|
|
3370
3370
|
}
|
|
3371
3371
|
|
|
3372
3372
|
func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) {
|
|
3373
|
-
r0, _, e1 := syscall.
|
|
3373
|
+
r0, _, e1 := syscall.SyscallN(procSizeofResource.Addr(), uintptr(module), uintptr(resInfo))
|
|
3374
3374
|
size = uint32(r0)
|
|
3375
3375
|
if size == 0 {
|
|
3376
3376
|
err = errnoErr(e1)
|
|
@@ -3383,13 +3383,13 @@ func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
|
|
|
3383
3383
|
if alertable {
|
|
3384
3384
|
_p0 = 1
|
|
3385
3385
|
}
|
|
3386
|
-
r0, _, _ := syscall.
|
|
3386
|
+
r0, _, _ := syscall.SyscallN(procSleepEx.Addr(), uintptr(milliseconds), uintptr(_p0))
|
|
3387
3387
|
ret = uint32(r0)
|
|
3388
3388
|
return
|
|
3389
3389
|
}
|
|
3390
3390
|
|
|
3391
3391
|
func TerminateJobObject(job Handle, exitCode uint32) (err error) {
|
|
3392
|
-
r1, _, e1 := syscall.
|
|
3392
|
+
r1, _, e1 := syscall.SyscallN(procTerminateJobObject.Addr(), uintptr(job), uintptr(exitCode))
|
|
3393
3393
|
if r1 == 0 {
|
|
3394
3394
|
err = errnoErr(e1)
|
|
3395
3395
|
}
|
|
@@ -3397,7 +3397,7 @@ func TerminateJobObject(job Handle, exitCode uint32) (err error) {
|
|
|
3397
3397
|
}
|
|
3398
3398
|
|
|
3399
3399
|
func TerminateProcess(handle Handle, exitcode uint32) (err error) {
|
|
3400
|
-
r1, _, e1 := syscall.
|
|
3400
|
+
r1, _, e1 := syscall.SyscallN(procTerminateProcess.Addr(), uintptr(handle), uintptr(exitcode))
|
|
3401
3401
|
if r1 == 0 {
|
|
3402
3402
|
err = errnoErr(e1)
|
|
3403
3403
|
}
|
|
@@ -3405,7 +3405,7 @@ func TerminateProcess(handle Handle, exitcode uint32) (err error) {
|
|
|
3405
3405
|
}
|
|
3406
3406
|
|
|
3407
3407
|
func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
|
|
3408
|
-
r1, _, e1 := syscall.
|
|
3408
|
+
r1, _, e1 := syscall.SyscallN(procThread32First.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)))
|
|
3409
3409
|
if r1 == 0 {
|
|
3410
3410
|
err = errnoErr(e1)
|
|
3411
3411
|
}
|
|
@@ -3413,7 +3413,7 @@ func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
|
|
|
3413
3413
|
}
|
|
3414
3414
|
|
|
3415
3415
|
func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
|
|
3416
|
-
r1, _, e1 := syscall.
|
|
3416
|
+
r1, _, e1 := syscall.SyscallN(procThread32Next.Addr(), uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)))
|
|
3417
3417
|
if r1 == 0 {
|
|
3418
3418
|
err = errnoErr(e1)
|
|
3419
3419
|
}
|
|
@@ -3421,7 +3421,7 @@ func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
|
|
3423
3423
|
func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
|
|
3424
|
-
r1, _, e1 := syscall.
|
|
3424
|
+
r1, _, e1 := syscall.SyscallN(procUnlockFileEx.Addr(), uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
|
|
3425
3425
|
if r1 == 0 {
|
|
3426
3426
|
err = errnoErr(e1)
|
|
3427
3427
|
}
|
|
@@ -3429,7 +3429,7 @@ func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint3
|
|
|
3429
3429
|
}
|
|
3430
3430
|
|
|
3431
3431
|
func UnmapViewOfFile(addr uintptr) (err error) {
|
|
3432
|
-
r1, _, e1 := syscall.
|
|
3432
|
+
r1, _, e1 := syscall.SyscallN(procUnmapViewOfFile.Addr(), uintptr(addr))
|
|
3433
3433
|
if r1 == 0 {
|
|
3434
3434
|
err = errnoErr(e1)
|
|
3435
3435
|
}
|
|
@@ -3437,7 +3437,7 @@ func UnmapViewOfFile(addr uintptr) (err error) {
|
|
|
3437
3437
|
}
|
|
3438
3438
|
|
|
3439
3439
|
func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) {
|
|
3440
|
-
r1, _, e1 := syscall.
|
|
3440
|
+
r1, _, e1 := syscall.SyscallN(procUpdateProcThreadAttribute.Addr(), uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)))
|
|
3441
3441
|
if r1 == 0 {
|
|
3442
3442
|
err = errnoErr(e1)
|
|
3443
3443
|
}
|
|
@@ -3445,7 +3445,7 @@ func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32,
|
|
|
3445
3445
|
}
|
|
3446
3446
|
|
|
3447
3447
|
func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
|
|
3448
|
-
r0, _, e1 := syscall.
|
|
3448
|
+
r0, _, e1 := syscall.SyscallN(procVirtualAlloc.Addr(), uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect))
|
|
3449
3449
|
value = uintptr(r0)
|
|
3450
3450
|
if value == 0 {
|
|
3451
3451
|
err = errnoErr(e1)
|
|
@@ -3454,7 +3454,7 @@ func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint3
|
|
|
3454
3454
|
}
|
|
3455
3455
|
|
|
3456
3456
|
func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
|
|
3457
|
-
r1, _, e1 := syscall.
|
|
3457
|
+
r1, _, e1 := syscall.SyscallN(procVirtualFree.Addr(), uintptr(address), uintptr(size), uintptr(freetype))
|
|
3458
3458
|
if r1 == 0 {
|
|
3459
3459
|
err = errnoErr(e1)
|
|
3460
3460
|
}
|
|
@@ -3462,7 +3462,7 @@ func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
|
|
|
3462
3462
|
}
|
|
3463
3463
|
|
|
3464
3464
|
func VirtualLock(addr uintptr, length uintptr) (err error) {
|
|
3465
|
-
r1, _, e1 := syscall.
|
|
3465
|
+
r1, _, e1 := syscall.SyscallN(procVirtualLock.Addr(), uintptr(addr), uintptr(length))
|
|
3466
3466
|
if r1 == 0 {
|
|
3467
3467
|
err = errnoErr(e1)
|
|
3468
3468
|
}
|
|
@@ -3470,7 +3470,7 @@ func VirtualLock(addr uintptr, length uintptr) (err error) {
|
|
|
3470
3470
|
}
|
|
3471
3471
|
|
|
3472
3472
|
func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
|
|
3473
|
-
r1, _, e1 := syscall.
|
|
3473
|
+
r1, _, e1 := syscall.SyscallN(procVirtualProtect.Addr(), uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)))
|
|
3474
3474
|
if r1 == 0 {
|
|
3475
3475
|
err = errnoErr(e1)
|
|
3476
3476
|
}
|
|
@@ -3478,7 +3478,7 @@ func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect
|
|
|
3478
3478
|
}
|
|
3479
3479
|
|
|
3480
3480
|
func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) {
|
|
3481
|
-
r1, _, e1 := syscall.
|
|
3481
|
+
r1, _, e1 := syscall.SyscallN(procVirtualProtectEx.Addr(), uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)))
|
|
3482
3482
|
if r1 == 0 {
|
|
3483
3483
|
err = errnoErr(e1)
|
|
3484
3484
|
}
|
|
@@ -3486,7 +3486,7 @@ func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect
|
|
|
3486
3486
|
}
|
|
3487
3487
|
|
|
3488
3488
|
func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
|
|
3489
|
-
r1, _, e1 := syscall.
|
|
3489
|
+
r1, _, e1 := syscall.SyscallN(procVirtualQuery.Addr(), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
|
|
3490
3490
|
if r1 == 0 {
|
|
3491
3491
|
err = errnoErr(e1)
|
|
3492
3492
|
}
|
|
@@ -3494,7 +3494,7 @@ func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintpt
|
|
|
3494
3494
|
}
|
|
3495
3495
|
|
|
3496
3496
|
func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
|
|
3497
|
-
r1, _, e1 := syscall.
|
|
3497
|
+
r1, _, e1 := syscall.SyscallN(procVirtualQueryEx.Addr(), uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
|
|
3498
3498
|
if r1 == 0 {
|
|
3499
3499
|
err = errnoErr(e1)
|
|
3500
3500
|
}
|
|
@@ -3502,7 +3502,7 @@ func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformat
|
|
|
3502
3502
|
}
|
|
3503
3503
|
|
|
3504
3504
|
func VirtualUnlock(addr uintptr, length uintptr) (err error) {
|
|
3505
|
-
r1, _, e1 := syscall.
|
|
3505
|
+
r1, _, e1 := syscall.SyscallN(procVirtualUnlock.Addr(), uintptr(addr), uintptr(length))
|
|
3506
3506
|
if r1 == 0 {
|
|
3507
3507
|
err = errnoErr(e1)
|
|
3508
3508
|
}
|
|
@@ -3510,13 +3510,13 @@ func VirtualUnlock(addr uintptr, length uintptr) (err error) {
|
|
|
3510
3510
|
}
|
|
3511
3511
|
|
|
3512
3512
|
func WTSGetActiveConsoleSessionId() (sessionID uint32) {
|
|
3513
|
-
r0, _, _ := syscall.
|
|
3513
|
+
r0, _, _ := syscall.SyscallN(procWTSGetActiveConsoleSessionId.Addr())
|
|
3514
3514
|
sessionID = uint32(r0)
|
|
3515
3515
|
return
|
|
3516
3516
|
}
|
|
3517
3517
|
|
|
3518
3518
|
func WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) {
|
|
3519
|
-
r1, _, e1 := syscall.
|
|
3519
|
+
r1, _, e1 := syscall.SyscallN(procWaitCommEvent.Addr(), uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped)))
|
|
3520
3520
|
if r1 == 0 {
|
|
3521
3521
|
err = errnoErr(e1)
|
|
3522
3522
|
}
|
|
@@ -3528,7 +3528,7 @@ func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMil
|
|
|
3528
3528
|
if waitAll {
|
|
3529
3529
|
_p0 = 1
|
|
3530
3530
|
}
|
|
3531
|
-
r0, _, e1 := syscall.
|
|
3531
|
+
r0, _, e1 := syscall.SyscallN(procWaitForMultipleObjects.Addr(), uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds))
|
|
3532
3532
|
event = uint32(r0)
|
|
3533
3533
|
if event == 0xffffffff {
|
|
3534
3534
|
err = errnoErr(e1)
|
|
@@ -3537,7 +3537,7 @@ func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMil
|
|
|
3537
3537
|
}
|
|
3538
3538
|
|
|
3539
3539
|
func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
|
|
3540
|
-
r0, _, e1 := syscall.
|
|
3540
|
+
r0, _, e1 := syscall.SyscallN(procWaitForSingleObject.Addr(), uintptr(handle), uintptr(waitMilliseconds))
|
|
3541
3541
|
event = uint32(r0)
|
|
3542
3542
|
if event == 0xffffffff {
|
|
3543
3543
|
err = errnoErr(e1)
|
|
@@ -3546,7 +3546,7 @@ func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32,
|
|
|
3546
3546
|
}
|
|
3547
3547
|
|
|
3548
3548
|
func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
|
|
3549
|
-
r1, _, e1 := syscall.
|
|
3549
|
+
r1, _, e1 := syscall.SyscallN(procWriteConsoleW.Addr(), uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)))
|
|
3550
3550
|
if r1 == 0 {
|
|
3551
3551
|
err = errnoErr(e1)
|
|
3552
3552
|
}
|
|
@@ -3558,7 +3558,7 @@ func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped)
|
|
|
3558
3558
|
if len(buf) > 0 {
|
|
3559
3559
|
_p0 = &buf[0]
|
|
3560
3560
|
}
|
|
3561
|
-
r1, _, e1 := syscall.
|
|
3561
|
+
r1, _, e1 := syscall.SyscallN(procWriteFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)))
|
|
3562
3562
|
if r1 == 0 {
|
|
3563
3563
|
err = errnoErr(e1)
|
|
3564
3564
|
}
|
|
@@ -3566,7 +3566,7 @@ func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped)
|
|
|
3566
3566
|
}
|
|
3567
3567
|
|
|
3568
3568
|
func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) {
|
|
3569
|
-
r1, _, e1 := syscall.
|
|
3569
|
+
r1, _, e1 := syscall.SyscallN(procWriteProcessMemory.Addr(), uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)))
|
|
3570
3570
|
if r1 == 0 {
|
|
3571
3571
|
err = errnoErr(e1)
|
|
3572
3572
|
}
|
|
@@ -3574,7 +3574,7 @@ func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size
|
|
|
3574
3574
|
}
|
|
3575
3575
|
|
|
3576
3576
|
func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
|
|
3577
|
-
r1, _, e1 := syscall.
|
|
3577
|
+
r1, _, e1 := syscall.SyscallN(procAcceptEx.Addr(), uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)))
|
|
3578
3578
|
if r1 == 0 {
|
|
3579
3579
|
err = errnoErr(e1)
|
|
3580
3580
|
}
|
|
@@ -3582,12 +3582,12 @@ func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32
|
|
|
3582
3582
|
}
|
|
3583
3583
|
|
|
3584
3584
|
func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
|
|
3585
|
-
syscall.
|
|
3585
|
+
syscall.SyscallN(procGetAcceptExSockaddrs.Addr(), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)))
|
|
3586
3586
|
return
|
|
3587
3587
|
}
|
|
3588
3588
|
|
|
3589
3589
|
func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
|
|
3590
|
-
r1, _, e1 := syscall.
|
|
3590
|
+
r1, _, e1 := syscall.SyscallN(procTransmitFile.Addr(), uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags))
|
|
3591
3591
|
if r1 == 0 {
|
|
3592
3592
|
err = errnoErr(e1)
|
|
3593
3593
|
}
|
|
@@ -3595,7 +3595,7 @@ func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint
|
|
|
3595
3595
|
}
|
|
3596
3596
|
|
|
3597
3597
|
func NetApiBufferFree(buf *byte) (neterr error) {
|
|
3598
|
-
r0, _, _ := syscall.
|
|
3598
|
+
r0, _, _ := syscall.SyscallN(procNetApiBufferFree.Addr(), uintptr(unsafe.Pointer(buf)))
|
|
3599
3599
|
if r0 != 0 {
|
|
3600
3600
|
neterr = syscall.Errno(r0)
|
|
3601
3601
|
}
|
|
@@ -3603,7 +3603,7 @@ func NetApiBufferFree(buf *byte) (neterr error) {
|
|
|
3603
3603
|
}
|
|
3604
3604
|
|
|
3605
3605
|
func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
|
|
3606
|
-
r0, _, _ := syscall.
|
|
3606
|
+
r0, _, _ := syscall.SyscallN(procNetGetJoinInformation.Addr(), uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
|
|
3607
3607
|
if r0 != 0 {
|
|
3608
3608
|
neterr = syscall.Errno(r0)
|
|
3609
3609
|
}
|
|
@@ -3611,7 +3611,7 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete
|
|
|
3611
3611
|
}
|
|
3612
3612
|
|
|
3613
3613
|
func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) {
|
|
3614
|
-
r0, _, _ := syscall.
|
|
3614
|
+
r0, _, _ := syscall.SyscallN(procNetUserEnum.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)))
|
|
3615
3615
|
if r0 != 0 {
|
|
3616
3616
|
neterr = syscall.Errno(r0)
|
|
3617
3617
|
}
|
|
@@ -3619,7 +3619,7 @@ func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, pr
|
|
|
3619
3619
|
}
|
|
3620
3620
|
|
|
3621
3621
|
func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
|
|
3622
|
-
r0, _, _ := syscall.
|
|
3622
|
+
r0, _, _ := syscall.SyscallN(procNetUserGetInfo.Addr(), uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)))
|
|
3623
3623
|
if r0 != 0 {
|
|
3624
3624
|
neterr = syscall.Errno(r0)
|
|
3625
3625
|
}
|
|
@@ -3627,7 +3627,7 @@ func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **by
|
|
|
3627
3627
|
}
|
|
3628
3628
|
|
|
3629
3629
|
func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) {
|
|
3630
|
-
r0, _, _ := syscall.
|
|
3630
|
+
r0, _, _ := syscall.SyscallN(procNtCreateFile.Addr(), uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength))
|
|
3631
3631
|
if r0 != 0 {
|
|
3632
3632
|
ntstatus = NTStatus(r0)
|
|
3633
3633
|
}
|
|
@@ -3635,7 +3635,7 @@ func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO
|
|
|
3635
3635
|
}
|
|
3636
3636
|
|
|
3637
3637
|
func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) {
|
|
3638
|
-
r0, _, _ := syscall.
|
|
3638
|
+
r0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)))
|
|
3639
3639
|
if r0 != 0 {
|
|
3640
3640
|
ntstatus = NTStatus(r0)
|
|
3641
3641
|
}
|
|
@@ -3643,7 +3643,7 @@ func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, i
|
|
|
3643
3643
|
}
|
|
3644
3644
|
|
|
3645
3645
|
func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) {
|
|
3646
|
-
r0, _, _ := syscall.
|
|
3646
|
+
r0, _, _ := syscall.SyscallN(procNtQueryInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)))
|
|
3647
3647
|
if r0 != 0 {
|
|
3648
3648
|
ntstatus = NTStatus(r0)
|
|
3649
3649
|
}
|
|
@@ -3651,7 +3651,7 @@ func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe
|
|
|
3651
3651
|
}
|
|
3652
3652
|
|
|
3653
3653
|
func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {
|
|
3654
|
-
r0, _, _ := syscall.
|
|
3654
|
+
r0, _, _ := syscall.SyscallN(procNtQuerySystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)))
|
|
3655
3655
|
if r0 != 0 {
|
|
3656
3656
|
ntstatus = NTStatus(r0)
|
|
3657
3657
|
}
|
|
@@ -3659,7 +3659,7 @@ func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInf
|
|
|
3659
3659
|
}
|
|
3660
3660
|
|
|
3661
3661
|
func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
|
|
3662
|
-
r0, _, _ := syscall.
|
|
3662
|
+
r0, _, _ := syscall.SyscallN(procNtSetInformationFile.Addr(), uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class))
|
|
3663
3663
|
if r0 != 0 {
|
|
3664
3664
|
ntstatus = NTStatus(r0)
|
|
3665
3665
|
}
|
|
@@ -3667,7 +3667,7 @@ func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte,
|
|
|
3667
3667
|
}
|
|
3668
3668
|
|
|
3669
3669
|
func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
|
|
3670
|
-
r0, _, _ := syscall.
|
|
3670
|
+
r0, _, _ := syscall.SyscallN(procNtSetInformationProcess.Addr(), uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen))
|
|
3671
3671
|
if r0 != 0 {
|
|
3672
3672
|
ntstatus = NTStatus(r0)
|
|
3673
3673
|
}
|
|
@@ -3675,7 +3675,7 @@ func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.P
|
|
|
3675
3675
|
}
|
|
3676
3676
|
|
|
3677
3677
|
func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {
|
|
3678
|
-
r0, _, _ := syscall.
|
|
3678
|
+
r0, _, _ := syscall.SyscallN(procNtSetSystemInformation.Addr(), uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
|
|
3679
3679
|
if r0 != 0 {
|
|
3680
3680
|
ntstatus = NTStatus(r0)
|
|
3681
3681
|
}
|
|
@@ -3683,13 +3683,13 @@ func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoL
|
|
|
3683
3683
|
}
|
|
3684
3684
|
|
|
3685
3685
|
func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {
|
|
3686
|
-
r0, _, _ := syscall.
|
|
3686
|
+
r0, _, _ := syscall.SyscallN(procRtlAddFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
|
|
3687
3687
|
ret = r0 != 0
|
|
3688
3688
|
return
|
|
3689
3689
|
}
|
|
3690
3690
|
|
|
3691
3691
|
func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
|
|
3692
|
-
r0, _, _ := syscall.
|
|
3692
|
+
r0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(acl)))
|
|
3693
3693
|
if r0 != 0 {
|
|
3694
3694
|
ntstatus = NTStatus(r0)
|
|
3695
3695
|
}
|
|
@@ -3697,13 +3697,13 @@ func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
|
|
|
3697
3697
|
}
|
|
3698
3698
|
|
|
3699
3699
|
func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {
|
|
3700
|
-
r0, _, _ := syscall.
|
|
3700
|
+
r0, _, _ := syscall.SyscallN(procRtlDeleteFunctionTable.Addr(), uintptr(unsafe.Pointer(functionTable)))
|
|
3701
3701
|
ret = r0 != 0
|
|
3702
3702
|
return
|
|
3703
3703
|
}
|
|
3704
3704
|
|
|
3705
3705
|
func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
|
|
3706
|
-
r0, _, _ := syscall.
|
|
3706
|
+
r0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)))
|
|
3707
3707
|
if r0 != 0 {
|
|
3708
3708
|
ntstatus = NTStatus(r0)
|
|
3709
3709
|
}
|
|
@@ -3711,7 +3711,7 @@ func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFile
|
|
|
3711
3711
|
}
|
|
3712
3712
|
|
|
3713
3713
|
func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
|
|
3714
|
-
r0, _, _ := syscall.
|
|
3714
|
+
r0, _, _ := syscall.SyscallN(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)))
|
|
3715
3715
|
if r0 != 0 {
|
|
3716
3716
|
ntstatus = NTStatus(r0)
|
|
3717
3717
|
}
|
|
@@ -3719,18 +3719,18 @@ func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString
|
|
|
3719
3719
|
}
|
|
3720
3720
|
|
|
3721
3721
|
func RtlGetCurrentPeb() (peb *PEB) {
|
|
3722
|
-
r0, _, _ := syscall.
|
|
3722
|
+
r0, _, _ := syscall.SyscallN(procRtlGetCurrentPeb.Addr())
|
|
3723
3723
|
peb = (*PEB)(unsafe.Pointer(r0))
|
|
3724
3724
|
return
|
|
3725
3725
|
}
|
|
3726
3726
|
|
|
3727
3727
|
func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
|
|
3728
|
-
syscall.
|
|
3728
|
+
syscall.SyscallN(procRtlGetNtVersionNumbers.Addr(), uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
|
|
3729
3729
|
return
|
|
3730
3730
|
}
|
|
3731
3731
|
|
|
3732
3732
|
func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {
|
|
3733
|
-
r0, _, _ := syscall.
|
|
3733
|
+
r0, _, _ := syscall.SyscallN(procRtlGetVersion.Addr(), uintptr(unsafe.Pointer(info)))
|
|
3734
3734
|
if r0 != 0 {
|
|
3735
3735
|
ntstatus = NTStatus(r0)
|
|
3736
3736
|
}
|
|
@@ -3738,23 +3738,23 @@ func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {
|
|
|
3738
3738
|
}
|
|
3739
3739
|
|
|
3740
3740
|
func RtlInitString(destinationString *NTString, sourceString *byte) {
|
|
3741
|
-
syscall.
|
|
3741
|
+
syscall.SyscallN(procRtlInitString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)))
|
|
3742
3742
|
return
|
|
3743
3743
|
}
|
|
3744
3744
|
|
|
3745
3745
|
func RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) {
|
|
3746
|
-
syscall.
|
|
3746
|
+
syscall.SyscallN(procRtlInitUnicodeString.Addr(), uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)))
|
|
3747
3747
|
return
|
|
3748
3748
|
}
|
|
3749
3749
|
|
|
3750
3750
|
func rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) {
|
|
3751
|
-
r0, _, _ := syscall.
|
|
3751
|
+
r0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(ntstatus))
|
|
3752
3752
|
ret = syscall.Errno(r0)
|
|
3753
3753
|
return
|
|
3754
3754
|
}
|
|
3755
3755
|
|
|
3756
3756
|
func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
|
|
3757
|
-
r0, _, _ := syscall.
|
|
3757
|
+
r0, _, _ := syscall.SyscallN(procCLSIDFromString.Addr(), uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)))
|
|
3758
3758
|
if r0 != 0 {
|
|
3759
3759
|
ret = syscall.Errno(r0)
|
|
3760
3760
|
}
|
|
@@ -3762,7 +3762,7 @@ func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
|
|
3764
3764
|
func coCreateGuid(pguid *GUID) (ret error) {
|
|
3765
|
-
r0, _, _ := syscall.
|
|
3765
|
+
r0, _, _ := syscall.SyscallN(procCoCreateGuid.Addr(), uintptr(unsafe.Pointer(pguid)))
|
|
3766
3766
|
if r0 != 0 {
|
|
3767
3767
|
ret = syscall.Errno(r0)
|
|
3768
3768
|
}
|
|
@@ -3770,7 +3770,7 @@ func coCreateGuid(pguid *GUID) (ret error) {
|
|
|
3770
3770
|
}
|
|
3771
3771
|
|
|
3772
3772
|
func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) {
|
|
3773
|
-
r0, _, _ := syscall.
|
|
3773
|
+
r0, _, _ := syscall.SyscallN(procCoGetObject.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)))
|
|
3774
3774
|
if r0 != 0 {
|
|
3775
3775
|
ret = syscall.Errno(r0)
|
|
3776
3776
|
}
|
|
@@ -3778,7 +3778,7 @@ func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable *
|
|
|
3778
3778
|
}
|
|
3779
3779
|
|
|
3780
3780
|
func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {
|
|
3781
|
-
r0, _, _ := syscall.
|
|
3781
|
+
r0, _, _ := syscall.SyscallN(procCoInitializeEx.Addr(), uintptr(reserved), uintptr(coInit))
|
|
3782
3782
|
if r0 != 0 {
|
|
3783
3783
|
ret = syscall.Errno(r0)
|
|
3784
3784
|
}
|
|
@@ -3786,23 +3786,23 @@ func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {
|
|
|
3786
3786
|
}
|
|
3787
3787
|
|
|
3788
3788
|
func CoTaskMemFree(address unsafe.Pointer) {
|
|
3789
|
-
syscall.
|
|
3789
|
+
syscall.SyscallN(procCoTaskMemFree.Addr(), uintptr(address))
|
|
3790
3790
|
return
|
|
3791
3791
|
}
|
|
3792
3792
|
|
|
3793
3793
|
func CoUninitialize() {
|
|
3794
|
-
syscall.
|
|
3794
|
+
syscall.SyscallN(procCoUninitialize.Addr())
|
|
3795
3795
|
return
|
|
3796
3796
|
}
|
|
3797
3797
|
|
|
3798
3798
|
func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
|
|
3799
|
-
r0, _, _ := syscall.
|
|
3799
|
+
r0, _, _ := syscall.SyscallN(procStringFromGUID2.Addr(), uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
|
|
3800
3800
|
chars = int32(r0)
|
|
3801
3801
|
return
|
|
3802
3802
|
}
|
|
3803
3803
|
|
|
3804
3804
|
func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {
|
|
3805
|
-
r1, _, e1 := syscall.
|
|
3805
|
+
r1, _, e1 := syscall.SyscallN(procEnumProcessModules.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)))
|
|
3806
3806
|
if r1 == 0 {
|
|
3807
3807
|
err = errnoErr(e1)
|
|
3808
3808
|
}
|
|
@@ -3810,7 +3810,7 @@ func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uin
|
|
|
3810
3810
|
}
|
|
3811
3811
|
|
|
3812
3812
|
func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {
|
|
3813
|
-
r1, _, e1 := syscall.
|
|
3813
|
+
r1, _, e1 := syscall.SyscallN(procEnumProcessModulesEx.Addr(), uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag))
|
|
3814
3814
|
if r1 == 0 {
|
|
3815
3815
|
err = errnoErr(e1)
|
|
3816
3816
|
}
|
|
@@ -3818,7 +3818,7 @@ func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *u
|
|
|
3818
3818
|
}
|
|
3819
3819
|
|
|
3820
3820
|
func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) {
|
|
3821
|
-
r1, _, e1 := syscall.
|
|
3821
|
+
r1, _, e1 := syscall.SyscallN(procEnumProcesses.Addr(), uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned)))
|
|
3822
3822
|
if r1 == 0 {
|
|
3823
3823
|
err = errnoErr(e1)
|
|
3824
3824
|
}
|
|
@@ -3826,7 +3826,7 @@ func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err
|
|
|
3826
3826
|
}
|
|
3827
3827
|
|
|
3828
3828
|
func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {
|
|
3829
|
-
r1, _, e1 := syscall.
|
|
3829
|
+
r1, _, e1 := syscall.SyscallN(procGetModuleBaseNameW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size))
|
|
3830
3830
|
if r1 == 0 {
|
|
3831
3831
|
err = errnoErr(e1)
|
|
3832
3832
|
}
|
|
@@ -3834,7 +3834,7 @@ func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uin
|
|
|
3834
3834
|
}
|
|
3835
3835
|
|
|
3836
3836
|
func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {
|
|
3837
|
-
r1, _, e1 := syscall.
|
|
3837
|
+
r1, _, e1 := syscall.SyscallN(procGetModuleFileNameExW.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
|
|
3838
3838
|
if r1 == 0 {
|
|
3839
3839
|
err = errnoErr(e1)
|
|
3840
3840
|
}
|
|
@@ -3842,7 +3842,7 @@ func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size u
|
|
|
3842
3842
|
}
|
|
3843
3843
|
|
|
3844
3844
|
func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {
|
|
3845
|
-
r1, _, e1 := syscall.
|
|
3845
|
+
r1, _, e1 := syscall.SyscallN(procGetModuleInformation.Addr(), uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb))
|
|
3846
3846
|
if r1 == 0 {
|
|
3847
3847
|
err = errnoErr(e1)
|
|
3848
3848
|
}
|
|
@@ -3850,7 +3850,7 @@ func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb
|
|
|
3850
3850
|
}
|
|
3851
3851
|
|
|
3852
3852
|
func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) {
|
|
3853
|
-
r1, _, e1 := syscall.
|
|
3853
|
+
r1, _, e1 := syscall.SyscallN(procQueryWorkingSetEx.Addr(), uintptr(process), uintptr(pv), uintptr(cb))
|
|
3854
3854
|
if r1 == 0 {
|
|
3855
3855
|
err = errnoErr(e1)
|
|
3856
3856
|
}
|
|
@@ -3862,7 +3862,7 @@ func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callb
|
|
|
3862
3862
|
if ret != nil {
|
|
3863
3863
|
return
|
|
3864
3864
|
}
|
|
3865
|
-
r0, _, _ := syscall.
|
|
3865
|
+
r0, _, _ := syscall.SyscallN(procSubscribeServiceChangeNotifications.Addr(), uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)))
|
|
3866
3866
|
if r0 != 0 {
|
|
3867
3867
|
ret = syscall.Errno(r0)
|
|
3868
3868
|
}
|
|
@@ -3874,12 +3874,12 @@ func UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) {
|
|
|
3874
3874
|
if err != nil {
|
|
3875
3875
|
return
|
|
3876
3876
|
}
|
|
3877
|
-
syscall.
|
|
3877
|
+
syscall.SyscallN(procUnsubscribeServiceChangeNotifications.Addr(), uintptr(subscription))
|
|
3878
3878
|
return
|
|
3879
3879
|
}
|
|
3880
3880
|
|
|
3881
3881
|
func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
|
|
3882
|
-
r1, _, e1 := syscall.
|
|
3882
|
+
r1, _, e1 := syscall.SyscallN(procGetUserNameExW.Addr(), uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
|
|
3883
3883
|
if r1&0xff == 0 {
|
|
3884
3884
|
err = errnoErr(e1)
|
|
3885
3885
|
}
|
|
@@ -3887,7 +3887,7 @@ func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err er
|
|
|
3887
3887
|
}
|
|
3888
3888
|
|
|
3889
3889
|
func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
|
|
3890
|
-
r1, _, e1 := syscall.
|
|
3890
|
+
r1, _, e1 := syscall.SyscallN(procTranslateNameW.Addr(), uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)))
|
|
3891
3891
|
if r1&0xff == 0 {
|
|
3892
3892
|
err = errnoErr(e1)
|
|
3893
3893
|
}
|
|
@@ -3895,7 +3895,7 @@ func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint
|
|
|
3895
3895
|
}
|
|
3896
3896
|
|
|
3897
3897
|
func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
|
|
3898
|
-
r1, _, e1 := syscall.
|
|
3898
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiBuildDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
|
|
3899
3899
|
if r1 == 0 {
|
|
3900
3900
|
err = errnoErr(e1)
|
|
3901
3901
|
}
|
|
@@ -3903,7 +3903,7 @@ func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa
|
|
|
3903
3903
|
}
|
|
3904
3904
|
|
|
3905
3905
|
func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
|
|
3906
|
-
r1, _, e1 := syscall.
|
|
3906
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiCallClassInstaller.Addr(), uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
|
|
3907
3907
|
if r1 == 0 {
|
|
3908
3908
|
err = errnoErr(e1)
|
|
3909
3909
|
}
|
|
@@ -3911,7 +3911,7 @@ func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInf
|
|
|
3911
3911
|
}
|
|
3912
3912
|
|
|
3913
3913
|
func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {
|
|
3914
|
-
r1, _, e1 := syscall.
|
|
3914
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiCancelDriverInfoSearch.Addr(), uintptr(deviceInfoSet))
|
|
3915
3915
|
if r1 == 0 {
|
|
3916
3916
|
err = errnoErr(e1)
|
|
3917
3917
|
}
|
|
@@ -3919,7 +3919,7 @@ func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {
|
|
|
3919
3919
|
}
|
|
3920
3920
|
|
|
3921
3921
|
func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
|
|
3922
|
-
r1, _, e1 := syscall.
|
|
3922
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiClassGuidsFromNameExW.Addr(), uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
|
|
3923
3923
|
if r1 == 0 {
|
|
3924
3924
|
err = errnoErr(e1)
|
|
3925
3925
|
}
|
|
@@ -3927,7 +3927,7 @@ func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGu
|
|
|
3927
3927
|
}
|
|
3928
3928
|
|
|
3929
3929
|
func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
|
|
3930
|
-
r1, _, e1 := syscall.
|
|
3930
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiClassNameFromGuidExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
|
|
3931
3931
|
if r1 == 0 {
|
|
3932
3932
|
err = errnoErr(e1)
|
|
3933
3933
|
}
|
|
@@ -3935,7 +3935,7 @@ func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSiz
|
|
|
3935
3935
|
}
|
|
3936
3936
|
|
|
3937
3937
|
func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
|
|
3938
|
-
r0, _, e1 := syscall.
|
|
3938
|
+
r0, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoListExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
|
|
3939
3939
|
handle = DevInfo(r0)
|
|
3940
3940
|
if handle == DevInfo(InvalidHandle) {
|
|
3941
3941
|
err = errnoErr(e1)
|
|
@@ -3944,7 +3944,7 @@ func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineN
|
|
|
3944
3944
|
}
|
|
3945
3945
|
|
|
3946
3946
|
func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) {
|
|
3947
|
-
r1, _, e1 := syscall.
|
|
3947
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiCreateDeviceInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)))
|
|
3948
3948
|
if r1 == 0 {
|
|
3949
3949
|
err = errnoErr(e1)
|
|
3950
3950
|
}
|
|
@@ -3952,7 +3952,7 @@ func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUI
|
|
|
3952
3952
|
}
|
|
3953
3953
|
|
|
3954
3954
|
func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {
|
|
3955
|
-
r1, _, e1 := syscall.
|
|
3955
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiDestroyDeviceInfoList.Addr(), uintptr(deviceInfoSet))
|
|
3956
3956
|
if r1 == 0 {
|
|
3957
3957
|
err = errnoErr(e1)
|
|
3958
3958
|
}
|
|
@@ -3960,7 +3960,7 @@ func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {
|
|
|
3960
3960
|
}
|
|
3961
3961
|
|
|
3962
3962
|
func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
|
|
3963
|
-
r1, _, e1 := syscall.
|
|
3963
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiDestroyDriverInfoList.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
|
|
3964
3964
|
if r1 == 0 {
|
|
3965
3965
|
err = errnoErr(e1)
|
|
3966
3966
|
}
|
|
@@ -3968,7 +3968,7 @@ func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfo
|
|
|
3968
3968
|
}
|
|
3969
3969
|
|
|
3970
3970
|
func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) {
|
|
3971
|
-
r1, _, e1 := syscall.
|
|
3971
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiEnumDeviceInfo.Addr(), uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData)))
|
|
3972
3972
|
if r1 == 0 {
|
|
3973
3973
|
err = errnoErr(e1)
|
|
3974
3974
|
}
|
|
@@ -3976,7 +3976,7 @@ func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfo
|
|
|
3976
3976
|
}
|
|
3977
3977
|
|
|
3978
3978
|
func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) {
|
|
3979
|
-
r1, _, e1 := syscall.
|
|
3979
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiEnumDriverInfoW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)))
|
|
3980
3980
|
if r1 == 0 {
|
|
3981
3981
|
err = errnoErr(e1)
|
|
3982
3982
|
}
|
|
@@ -3984,7 +3984,7 @@ func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, d
|
|
|
3984
3984
|
}
|
|
3985
3985
|
|
|
3986
3986
|
func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
|
|
3987
|
-
r0, _, e1 := syscall.
|
|
3987
|
+
r0, _, e1 := syscall.SyscallN(procSetupDiGetClassDevsExW.Addr(), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
|
|
3988
3988
|
handle = DevInfo(r0)
|
|
3989
3989
|
if handle == DevInfo(InvalidHandle) {
|
|
3990
3990
|
err = errnoErr(e1)
|
|
@@ -3993,7 +3993,7 @@ func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintp
|
|
|
3993
3993
|
}
|
|
3994
3994
|
|
|
3995
3995
|
func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) {
|
|
3996
|
-
r1, _, e1 := syscall.
|
|
3996
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)))
|
|
3997
3997
|
if r1 == 0 {
|
|
3998
3998
|
err = errnoErr(e1)
|
|
3999
3999
|
}
|
|
@@ -4001,7 +4001,7 @@ func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfo
|
|
|
4001
4001
|
}
|
|
4002
4002
|
|
|
4003
4003
|
func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) {
|
|
4004
|
-
r1, _, e1 := syscall.
|
|
4004
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInfoListDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)))
|
|
4005
4005
|
if r1 == 0 {
|
|
4006
4006
|
err = errnoErr(e1)
|
|
4007
4007
|
}
|
|
@@ -4009,7 +4009,7 @@ func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailDa
|
|
|
4009
4009
|
}
|
|
4010
4010
|
|
|
4011
4011
|
func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
|
|
4012
|
-
r1, _, e1 := syscall.
|
|
4012
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
|
|
4013
4013
|
if r1 == 0 {
|
|
4014
4014
|
err = errnoErr(e1)
|
|
4015
4015
|
}
|
|
@@ -4017,7 +4017,7 @@ func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInf
|
|
|
4017
4017
|
}
|
|
4018
4018
|
|
|
4019
4019
|
func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) {
|
|
4020
|
-
r1, _, e1 := syscall.
|
|
4020
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceInstanceIdW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)))
|
|
4021
4021
|
if r1 == 0 {
|
|
4022
4022
|
err = errnoErr(e1)
|
|
4023
4023
|
}
|
|
@@ -4025,7 +4025,7 @@ func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa
|
|
|
4025
4025
|
}
|
|
4026
4026
|
|
|
4027
4027
|
func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) {
|
|
4028
|
-
r1, _, e1 := syscall.
|
|
4028
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetDevicePropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags))
|
|
4029
4029
|
if r1 == 0 {
|
|
4030
4030
|
err = errnoErr(e1)
|
|
4031
4031
|
}
|
|
@@ -4033,7 +4033,7 @@ func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
|
|
|
4033
4033
|
}
|
|
4034
4034
|
|
|
4035
4035
|
func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) {
|
|
4036
|
-
r1, _, e1 := syscall.
|
|
4036
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)))
|
|
4037
4037
|
if r1 == 0 {
|
|
4038
4038
|
err = errnoErr(e1)
|
|
4039
4039
|
}
|
|
@@ -4041,7 +4041,7 @@ func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *Dev
|
|
|
4041
4041
|
}
|
|
4042
4042
|
|
|
4043
4043
|
func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) {
|
|
4044
|
-
r1, _, e1 := syscall.
|
|
4044
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetDriverInfoDetailW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize)))
|
|
4045
4045
|
if r1 == 0 {
|
|
4046
4046
|
err = errnoErr(e1)
|
|
4047
4047
|
}
|
|
@@ -4049,7 +4049,7 @@ func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoDa
|
|
|
4049
4049
|
}
|
|
4050
4050
|
|
|
4051
4051
|
func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
|
|
4052
|
-
r1, _, e1 := syscall.
|
|
4052
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
|
|
4053
4053
|
if r1 == 0 {
|
|
4054
4054
|
err = errnoErr(e1)
|
|
4055
4055
|
}
|
|
@@ -4057,7 +4057,7 @@ func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
|
|
|
4057
4057
|
}
|
|
4058
4058
|
|
|
4059
4059
|
func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
|
|
4060
|
-
r1, _, e1 := syscall.
|
|
4060
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiGetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
|
|
4061
4061
|
if r1 == 0 {
|
|
4062
4062
|
err = errnoErr(e1)
|
|
4063
4063
|
}
|
|
@@ -4065,7 +4065,7 @@ func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
|
|
|
4065
4065
|
}
|
|
4066
4066
|
|
|
4067
4067
|
func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) {
|
|
4068
|
-
r0, _, e1 := syscall.
|
|
4068
|
+
r0, _, e1 := syscall.SyscallN(procSetupDiOpenDevRegKey.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired))
|
|
4069
4069
|
key = Handle(r0)
|
|
4070
4070
|
if key == InvalidHandle {
|
|
4071
4071
|
err = errnoErr(e1)
|
|
@@ -4074,7 +4074,7 @@ func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Sc
|
|
|
4074
4074
|
}
|
|
4075
4075
|
|
|
4076
4076
|
func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) {
|
|
4077
|
-
r1, _, e1 := syscall.
|
|
4077
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiSetClassInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize))
|
|
4078
4078
|
if r1 == 0 {
|
|
4079
4079
|
err = errnoErr(e1)
|
|
4080
4080
|
}
|
|
@@ -4082,7 +4082,7 @@ func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfo
|
|
|
4082
4082
|
}
|
|
4083
4083
|
|
|
4084
4084
|
func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
|
|
4085
|
-
r1, _, e1 := syscall.
|
|
4085
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceInstallParamsW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
|
|
4086
4086
|
if r1 == 0 {
|
|
4087
4087
|
err = errnoErr(e1)
|
|
4088
4088
|
}
|
|
@@ -4090,7 +4090,7 @@ func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInf
|
|
|
4090
4090
|
}
|
|
4091
4091
|
|
|
4092
4092
|
func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) {
|
|
4093
|
-
r1, _, e1 := syscall.
|
|
4093
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiSetDeviceRegistryPropertyW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize))
|
|
4094
4094
|
if r1 == 0 {
|
|
4095
4095
|
err = errnoErr(e1)
|
|
4096
4096
|
}
|
|
@@ -4098,7 +4098,7 @@ func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *Dev
|
|
|
4098
4098
|
}
|
|
4099
4099
|
|
|
4100
4100
|
func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
|
|
4101
|
-
r1, _, e1 := syscall.
|
|
4101
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDevice.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
|
|
4102
4102
|
if r1 == 0 {
|
|
4103
4103
|
err = errnoErr(e1)
|
|
4104
4104
|
}
|
|
@@ -4106,7 +4106,7 @@ func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
|
|
|
4106
4106
|
}
|
|
4107
4107
|
|
|
4108
4108
|
func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
|
|
4109
|
-
r1, _, e1 := syscall.
|
|
4109
|
+
r1, _, e1 := syscall.SyscallN(procSetupDiSetSelectedDriverW.Addr(), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
|
|
4110
4110
|
if r1 == 0 {
|
|
4111
4111
|
err = errnoErr(e1)
|
|
4112
4112
|
}
|
|
@@ -4114,7 +4114,7 @@ func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData
|
|
|
4114
4114
|
}
|
|
4115
4115
|
|
|
4116
4116
|
func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) {
|
|
4117
|
-
r1, _, e1 := syscall.
|
|
4117
|
+
r1, _, e1 := syscall.SyscallN(procSetupUninstallOEMInfW.Addr(), uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved))
|
|
4118
4118
|
if r1 == 0 {
|
|
4119
4119
|
err = errnoErr(e1)
|
|
4120
4120
|
}
|
|
@@ -4122,7 +4122,7 @@ func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (er
|
|
|
4122
4122
|
}
|
|
4123
4123
|
|
|
4124
4124
|
func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) {
|
|
4125
|
-
r0, _, e1 := syscall.
|
|
4125
|
+
r0, _, e1 := syscall.SyscallN(procCommandLineToArgvW.Addr(), uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)))
|
|
4126
4126
|
argv = (**uint16)(unsafe.Pointer(r0))
|
|
4127
4127
|
if argv == nil {
|
|
4128
4128
|
err = errnoErr(e1)
|
|
@@ -4131,7 +4131,7 @@ func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) {
|
|
|
4131
4131
|
}
|
|
4132
4132
|
|
|
4133
4133
|
func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {
|
|
4134
|
-
r0, _, _ := syscall.
|
|
4134
|
+
r0, _, _ := syscall.SyscallN(procSHGetKnownFolderPath.Addr(), uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)))
|
|
4135
4135
|
if r0 != 0 {
|
|
4136
4136
|
ret = syscall.Errno(r0)
|
|
4137
4137
|
}
|
|
@@ -4139,7 +4139,7 @@ func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **u
|
|
|
4139
4139
|
}
|
|
4140
4140
|
|
|
4141
4141
|
func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
|
|
4142
|
-
r1, _, e1 := syscall.
|
|
4142
|
+
r1, _, e1 := syscall.SyscallN(procShellExecuteW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
|
|
4143
4143
|
if r1 <= 32 {
|
|
4144
4144
|
err = errnoErr(e1)
|
|
4145
4145
|
}
|
|
@@ -4147,12 +4147,12 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui
|
|
|
4147
4147
|
}
|
|
4148
4148
|
|
|
4149
4149
|
func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
|
|
4150
|
-
syscall.
|
|
4150
|
+
syscall.SyscallN(procEnumChildWindows.Addr(), uintptr(hwnd), uintptr(enumFunc), uintptr(param))
|
|
4151
4151
|
return
|
|
4152
4152
|
}
|
|
4153
4153
|
|
|
4154
4154
|
func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
|
|
4155
|
-
r1, _, e1 := syscall.
|
|
4155
|
+
r1, _, e1 := syscall.SyscallN(procEnumWindows.Addr(), uintptr(enumFunc), uintptr(param))
|
|
4156
4156
|
if r1 == 0 {
|
|
4157
4157
|
err = errnoErr(e1)
|
|
4158
4158
|
}
|
|
@@ -4160,7 +4160,7 @@ func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
|
|
|
4160
4160
|
}
|
|
4161
4161
|
|
|
4162
4162
|
func ExitWindowsEx(flags uint32, reason uint32) (err error) {
|
|
4163
|
-
r1, _, e1 := syscall.
|
|
4163
|
+
r1, _, e1 := syscall.SyscallN(procExitWindowsEx.Addr(), uintptr(flags), uintptr(reason))
|
|
4164
4164
|
if r1 == 0 {
|
|
4165
4165
|
err = errnoErr(e1)
|
|
4166
4166
|
}
|
|
@@ -4168,7 +4168,7 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
|
|
|
4168
4168
|
}
|
|
4169
4169
|
|
|
4170
4170
|
func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {
|
|
4171
|
-
r0, _, e1 := syscall.
|
|
4171
|
+
r0, _, e1 := syscall.SyscallN(procGetClassNameW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
|
|
4172
4172
|
copied = int32(r0)
|
|
4173
4173
|
if copied == 0 {
|
|
4174
4174
|
err = errnoErr(e1)
|
|
@@ -4177,19 +4177,19 @@ func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, e
|
|
|
4177
4177
|
}
|
|
4178
4178
|
|
|
4179
4179
|
func GetDesktopWindow() (hwnd HWND) {
|
|
4180
|
-
r0, _, _ := syscall.
|
|
4180
|
+
r0, _, _ := syscall.SyscallN(procGetDesktopWindow.Addr())
|
|
4181
4181
|
hwnd = HWND(r0)
|
|
4182
4182
|
return
|
|
4183
4183
|
}
|
|
4184
4184
|
|
|
4185
4185
|
func GetForegroundWindow() (hwnd HWND) {
|
|
4186
|
-
r0, _, _ := syscall.
|
|
4186
|
+
r0, _, _ := syscall.SyscallN(procGetForegroundWindow.Addr())
|
|
4187
4187
|
hwnd = HWND(r0)
|
|
4188
4188
|
return
|
|
4189
4189
|
}
|
|
4190
4190
|
|
|
4191
4191
|
func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
|
|
4192
|
-
r1, _, e1 := syscall.
|
|
4192
|
+
r1, _, e1 := syscall.SyscallN(procGetGUIThreadInfo.Addr(), uintptr(thread), uintptr(unsafe.Pointer(info)))
|
|
4193
4193
|
if r1 == 0 {
|
|
4194
4194
|
err = errnoErr(e1)
|
|
4195
4195
|
}
|
|
@@ -4197,19 +4197,19 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
|
|
|
4197
4197
|
}
|
|
4198
4198
|
|
|
4199
4199
|
func GetKeyboardLayout(tid uint32) (hkl Handle) {
|
|
4200
|
-
r0, _, _ := syscall.
|
|
4200
|
+
r0, _, _ := syscall.SyscallN(procGetKeyboardLayout.Addr(), uintptr(tid))
|
|
4201
4201
|
hkl = Handle(r0)
|
|
4202
4202
|
return
|
|
4203
4203
|
}
|
|
4204
4204
|
|
|
4205
4205
|
func GetShellWindow() (shellWindow HWND) {
|
|
4206
|
-
r0, _, _ := syscall.
|
|
4206
|
+
r0, _, _ := syscall.SyscallN(procGetShellWindow.Addr())
|
|
4207
4207
|
shellWindow = HWND(r0)
|
|
4208
4208
|
return
|
|
4209
4209
|
}
|
|
4210
4210
|
|
|
4211
4211
|
func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
|
|
4212
|
-
r0, _, e1 := syscall.
|
|
4212
|
+
r0, _, e1 := syscall.SyscallN(procGetWindowThreadProcessId.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(pid)))
|
|
4213
4213
|
tid = uint32(r0)
|
|
4214
4214
|
if tid == 0 {
|
|
4215
4215
|
err = errnoErr(e1)
|
|
@@ -4218,25 +4218,25 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
|
|
|
4218
4218
|
}
|
|
4219
4219
|
|
|
4220
4220
|
func IsWindow(hwnd HWND) (isWindow bool) {
|
|
4221
|
-
r0, _, _ := syscall.
|
|
4221
|
+
r0, _, _ := syscall.SyscallN(procIsWindow.Addr(), uintptr(hwnd))
|
|
4222
4222
|
isWindow = r0 != 0
|
|
4223
4223
|
return
|
|
4224
4224
|
}
|
|
4225
4225
|
|
|
4226
4226
|
func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
|
|
4227
|
-
r0, _, _ := syscall.
|
|
4227
|
+
r0, _, _ := syscall.SyscallN(procIsWindowUnicode.Addr(), uintptr(hwnd))
|
|
4228
4228
|
isUnicode = r0 != 0
|
|
4229
4229
|
return
|
|
4230
4230
|
}
|
|
4231
4231
|
|
|
4232
4232
|
func IsWindowVisible(hwnd HWND) (isVisible bool) {
|
|
4233
|
-
r0, _, _ := syscall.
|
|
4233
|
+
r0, _, _ := syscall.SyscallN(procIsWindowVisible.Addr(), uintptr(hwnd))
|
|
4234
4234
|
isVisible = r0 != 0
|
|
4235
4235
|
return
|
|
4236
4236
|
}
|
|
4237
4237
|
|
|
4238
4238
|
func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) {
|
|
4239
|
-
r0, _, e1 := syscall.
|
|
4239
|
+
r0, _, e1 := syscall.SyscallN(procLoadKeyboardLayoutW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags))
|
|
4240
4240
|
hkl = Handle(r0)
|
|
4241
4241
|
if hkl == 0 {
|
|
4242
4242
|
err = errnoErr(e1)
|
|
@@ -4245,7 +4245,7 @@ func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) {
|
|
|
4245
4245
|
}
|
|
4246
4246
|
|
|
4247
4247
|
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
|
|
4248
|
-
r0, _, e1 := syscall.
|
|
4248
|
+
r0, _, e1 := syscall.SyscallN(procMessageBoxW.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype))
|
|
4249
4249
|
ret = int32(r0)
|
|
4250
4250
|
if ret == 0 {
|
|
4251
4251
|
err = errnoErr(e1)
|
|
@@ -4254,13 +4254,13 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i
|
|
|
4254
4254
|
}
|
|
4255
4255
|
|
|
4256
4256
|
func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) {
|
|
4257
|
-
r0, _, _ := syscall.
|
|
4257
|
+
r0, _, _ := syscall.SyscallN(procToUnicodeEx.Addr(), uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl))
|
|
4258
4258
|
ret = int32(r0)
|
|
4259
4259
|
return
|
|
4260
4260
|
}
|
|
4261
4261
|
|
|
4262
4262
|
func UnloadKeyboardLayout(hkl Handle) (err error) {
|
|
4263
|
-
r1, _, e1 := syscall.
|
|
4263
|
+
r1, _, e1 := syscall.SyscallN(procUnloadKeyboardLayout.Addr(), uintptr(hkl))
|
|
4264
4264
|
if r1 == 0 {
|
|
4265
4265
|
err = errnoErr(e1)
|
|
4266
4266
|
}
|
|
@@ -4272,7 +4272,7 @@ func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (
|
|
|
4272
4272
|
if inheritExisting {
|
|
4273
4273
|
_p0 = 1
|
|
4274
4274
|
}
|
|
4275
|
-
r1, _, e1 := syscall.
|
|
4275
|
+
r1, _, e1 := syscall.SyscallN(procCreateEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
|
|
4276
4276
|
if r1 == 0 {
|
|
4277
4277
|
err = errnoErr(e1)
|
|
4278
4278
|
}
|
|
@@ -4280,7 +4280,7 @@ func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (
|
|
|
4280
4280
|
}
|
|
4281
4281
|
|
|
4282
4282
|
func DestroyEnvironmentBlock(block *uint16) (err error) {
|
|
4283
|
-
r1, _, e1 := syscall.
|
|
4283
|
+
r1, _, e1 := syscall.SyscallN(procDestroyEnvironmentBlock.Addr(), uintptr(unsafe.Pointer(block)))
|
|
4284
4284
|
if r1 == 0 {
|
|
4285
4285
|
err = errnoErr(e1)
|
|
4286
4286
|
}
|
|
@@ -4288,7 +4288,7 @@ func DestroyEnvironmentBlock(block *uint16) (err error) {
|
|
|
4288
4288
|
}
|
|
4289
4289
|
|
|
4290
4290
|
func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
|
|
4291
|
-
r1, _, e1 := syscall.
|
|
4291
|
+
r1, _, e1 := syscall.SyscallN(procGetUserProfileDirectoryW.Addr(), uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
|
|
4292
4292
|
if r1 == 0 {
|
|
4293
4293
|
err = errnoErr(e1)
|
|
4294
4294
|
}
|
|
@@ -4305,7 +4305,7 @@ func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32
|
|
|
4305
4305
|
}
|
|
4306
4306
|
|
|
4307
4307
|
func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {
|
|
4308
|
-
r0, _, e1 := syscall.
|
|
4308
|
+
r0, _, e1 := syscall.SyscallN(procGetFileVersionInfoSizeW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)))
|
|
4309
4309
|
bufSize = uint32(r0)
|
|
4310
4310
|
if bufSize == 0 {
|
|
4311
4311
|
err = errnoErr(e1)
|
|
@@ -4323,7 +4323,7 @@ func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer u
|
|
|
4323
4323
|
}
|
|
4324
4324
|
|
|
4325
4325
|
func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
|
|
4326
|
-
r1, _, e1 := syscall.
|
|
4326
|
+
r1, _, e1 := syscall.SyscallN(procGetFileVersionInfoW.Addr(), uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer))
|
|
4327
4327
|
if r1 == 0 {
|
|
4328
4328
|
err = errnoErr(e1)
|
|
4329
4329
|
}
|
|
@@ -4340,7 +4340,7 @@ func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer
|
|
|
4340
4340
|
}
|
|
4341
4341
|
|
|
4342
4342
|
func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
|
|
4343
|
-
r1, _, e1 := syscall.
|
|
4343
|
+
r1, _, e1 := syscall.SyscallN(procVerQueryValueW.Addr(), uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)))
|
|
4344
4344
|
if r1 == 0 {
|
|
4345
4345
|
err = errnoErr(e1)
|
|
4346
4346
|
}
|
|
@@ -4348,7 +4348,7 @@ func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPoint
|
|
|
4348
4348
|
}
|
|
4349
4349
|
|
|
4350
4350
|
func TimeBeginPeriod(period uint32) (err error) {
|
|
4351
|
-
r1, _, e1 := syscall.
|
|
4351
|
+
r1, _, e1 := syscall.SyscallN(proctimeBeginPeriod.Addr(), uintptr(period))
|
|
4352
4352
|
if r1 != 0 {
|
|
4353
4353
|
err = errnoErr(e1)
|
|
4354
4354
|
}
|
|
@@ -4356,7 +4356,7 @@ func TimeBeginPeriod(period uint32) (err error) {
|
|
|
4356
4356
|
}
|
|
4357
4357
|
|
|
4358
4358
|
func TimeEndPeriod(period uint32) (err error) {
|
|
4359
|
-
r1, _, e1 := syscall.
|
|
4359
|
+
r1, _, e1 := syscall.SyscallN(proctimeEndPeriod.Addr(), uintptr(period))
|
|
4360
4360
|
if r1 != 0 {
|
|
4361
4361
|
err = errnoErr(e1)
|
|
4362
4362
|
}
|
|
@@ -4364,7 +4364,7 @@ func TimeEndPeriod(period uint32) (err error) {
|
|
|
4364
4364
|
}
|
|
4365
4365
|
|
|
4366
4366
|
func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
|
|
4367
|
-
r0, _, _ := syscall.
|
|
4367
|
+
r0, _, _ := syscall.SyscallN(procWinVerifyTrustEx.Addr(), uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
|
|
4368
4368
|
if r0 != 0 {
|
|
4369
4369
|
ret = syscall.Errno(r0)
|
|
4370
4370
|
}
|
|
@@ -4372,12 +4372,12 @@ func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error)
|
|
|
4372
4372
|
}
|
|
4373
4373
|
|
|
4374
4374
|
func FreeAddrInfoW(addrinfo *AddrinfoW) {
|
|
4375
|
-
syscall.
|
|
4375
|
+
syscall.SyscallN(procFreeAddrInfoW.Addr(), uintptr(unsafe.Pointer(addrinfo)))
|
|
4376
4376
|
return
|
|
4377
4377
|
}
|
|
4378
4378
|
|
|
4379
4379
|
func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
|
|
4380
|
-
r0, _, _ := syscall.
|
|
4380
|
+
r0, _, _ := syscall.SyscallN(procGetAddrInfoW.Addr(), uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)))
|
|
4381
4381
|
if r0 != 0 {
|
|
4382
4382
|
sockerr = syscall.Errno(r0)
|
|
4383
4383
|
}
|
|
@@ -4385,7 +4385,7 @@ func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, resul
|
|
|
4385
4385
|
}
|
|
4386
4386
|
|
|
4387
4387
|
func WSACleanup() (err error) {
|
|
4388
|
-
r1, _, e1 := syscall.
|
|
4388
|
+
r1, _, e1 := syscall.SyscallN(procWSACleanup.Addr())
|
|
4389
4389
|
if r1 == socket_error {
|
|
4390
4390
|
err = errnoErr(e1)
|
|
4391
4391
|
}
|
|
@@ -4393,7 +4393,7 @@ func WSACleanup() (err error) {
|
|
|
4393
4393
|
}
|
|
4394
4394
|
|
|
4395
4395
|
func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err error) {
|
|
4396
|
-
r1, _, e1 := syscall.
|
|
4396
|
+
r1, _, e1 := syscall.SyscallN(procWSADuplicateSocketW.Addr(), uintptr(s), uintptr(processID), uintptr(unsafe.Pointer(info)))
|
|
4397
4397
|
if r1 != 0 {
|
|
4398
4398
|
err = errnoErr(e1)
|
|
4399
4399
|
}
|
|
@@ -4401,7 +4401,7 @@ func WSADuplicateSocket(s Handle, processID uint32, info *WSAProtocolInfo) (err
|
|
|
4401
4401
|
}
|
|
4402
4402
|
|
|
4403
4403
|
func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
|
|
4404
|
-
r0, _, e1 := syscall.
|
|
4404
|
+
r0, _, e1 := syscall.SyscallN(procWSAEnumProtocolsW.Addr(), uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
|
|
4405
4405
|
n = int32(r0)
|
|
4406
4406
|
if n == -1 {
|
|
4407
4407
|
err = errnoErr(e1)
|
|
@@ -4414,7 +4414,7 @@ func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, f
|
|
|
4414
4414
|
if wait {
|
|
4415
4415
|
_p0 = 1
|
|
4416
4416
|
}
|
|
4417
|
-
r1, _, e1 := syscall.
|
|
4417
|
+
r1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)))
|
|
4418
4418
|
if r1 == 0 {
|
|
4419
4419
|
err = errnoErr(e1)
|
|
4420
4420
|
}
|
|
@@ -4422,7 +4422,7 @@ func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, f
|
|
|
4422
4422
|
}
|
|
4423
4423
|
|
|
4424
4424
|
func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
|
|
4425
|
-
r1, _, e1 := syscall.
|
|
4425
|
+
r1, _, e1 := syscall.SyscallN(procWSAIoctl.Addr(), uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
|
|
4426
4426
|
if r1 == socket_error {
|
|
4427
4427
|
err = errnoErr(e1)
|
|
4428
4428
|
}
|
|
@@ -4430,7 +4430,7 @@ func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbo
|
|
|
4430
4430
|
}
|
|
4431
4431
|
|
|
4432
4432
|
func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) {
|
|
4433
|
-
r1, _, e1 := syscall.
|
|
4433
|
+
r1, _, e1 := syscall.SyscallN(procWSALookupServiceBeginW.Addr(), uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle)))
|
|
4434
4434
|
if r1 == socket_error {
|
|
4435
4435
|
err = errnoErr(e1)
|
|
4436
4436
|
}
|
|
@@ -4438,7 +4438,7 @@ func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle)
|
|
|
4438
4438
|
}
|
|
4439
4439
|
|
|
4440
4440
|
func WSALookupServiceEnd(handle Handle) (err error) {
|
|
4441
|
-
r1, _, e1 := syscall.
|
|
4441
|
+
r1, _, e1 := syscall.SyscallN(procWSALookupServiceEnd.Addr(), uintptr(handle))
|
|
4442
4442
|
if r1 == socket_error {
|
|
4443
4443
|
err = errnoErr(e1)
|
|
4444
4444
|
}
|
|
@@ -4446,7 +4446,7 @@ func WSALookupServiceEnd(handle Handle) (err error) {
|
|
|
4446
4446
|
}
|
|
4447
4447
|
|
|
4448
4448
|
func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) {
|
|
4449
|
-
r1, _, e1 := syscall.
|
|
4449
|
+
r1, _, e1 := syscall.SyscallN(procWSALookupServiceNextW.Addr(), uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet)))
|
|
4450
4450
|
if r1 == socket_error {
|
|
4451
4451
|
err = errnoErr(e1)
|
|
4452
4452
|
}
|
|
@@ -4454,7 +4454,7 @@ func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WS
|
|
|
4454
4454
|
}
|
|
4455
4455
|
|
|
4456
4456
|
func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
|
|
4457
|
-
r1, _, e1 := syscall.
|
|
4457
|
+
r1, _, e1 := syscall.SyscallN(procWSARecv.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
|
|
4458
4458
|
if r1 == socket_error {
|
|
4459
4459
|
err = errnoErr(e1)
|
|
4460
4460
|
}
|
|
@@ -4462,7 +4462,7 @@ func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32
|
|
|
4462
4462
|
}
|
|
4463
4463
|
|
|
4464
4464
|
func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
|
|
4465
|
-
r1, _, e1 := syscall.
|
|
4465
|
+
r1, _, e1 := syscall.SyscallN(procWSARecvFrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
|
|
4466
4466
|
if r1 == socket_error {
|
|
4467
4467
|
err = errnoErr(e1)
|
|
4468
4468
|
}
|
|
@@ -4470,7 +4470,7 @@ func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *ui
|
|
|
4470
4470
|
}
|
|
4471
4471
|
|
|
4472
4472
|
func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
|
|
4473
|
-
r1, _, e1 := syscall.
|
|
4473
|
+
r1, _, e1 := syscall.SyscallN(procWSASend.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
|
|
4474
4474
|
if r1 == socket_error {
|
|
4475
4475
|
err = errnoErr(e1)
|
|
4476
4476
|
}
|
|
@@ -4478,7 +4478,7 @@ func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32,
|
|
|
4478
4478
|
}
|
|
4479
4479
|
|
|
4480
4480
|
func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
|
|
4481
|
-
r1, _, e1 := syscall.
|
|
4481
|
+
r1, _, e1 := syscall.SyscallN(procWSASendTo.Addr(), uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
|
|
4482
4482
|
if r1 == socket_error {
|
|
4483
4483
|
err = errnoErr(e1)
|
|
4484
4484
|
}
|
|
@@ -4486,7 +4486,7 @@ func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32
|
|
|
4486
4486
|
}
|
|
4487
4487
|
|
|
4488
4488
|
func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) {
|
|
4489
|
-
r0, _, e1 := syscall.
|
|
4489
|
+
r0, _, e1 := syscall.SyscallN(procWSASocketW.Addr(), uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))
|
|
4490
4490
|
handle = Handle(r0)
|
|
4491
4491
|
if handle == InvalidHandle {
|
|
4492
4492
|
err = errnoErr(e1)
|
|
@@ -4495,7 +4495,7 @@ func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo,
|
|
|
4495
4495
|
}
|
|
4496
4496
|
|
|
4497
4497
|
func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
|
|
4498
|
-
r0, _, _ := syscall.
|
|
4498
|
+
r0, _, _ := syscall.SyscallN(procWSAStartup.Addr(), uintptr(verreq), uintptr(unsafe.Pointer(data)))
|
|
4499
4499
|
if r0 != 0 {
|
|
4500
4500
|
sockerr = syscall.Errno(r0)
|
|
4501
4501
|
}
|
|
@@ -4503,7 +4503,7 @@ func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
|
|
|
4503
4503
|
}
|
|
4504
4504
|
|
|
4505
4505
|
func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
|
|
4506
|
-
r1, _, e1 := syscall.
|
|
4506
|
+
r1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen))
|
|
4507
4507
|
if r1 == socket_error {
|
|
4508
4508
|
err = errnoErr(e1)
|
|
4509
4509
|
}
|
|
@@ -4511,7 +4511,7 @@ func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
|
|
|
4511
4511
|
}
|
|
4512
4512
|
|
|
4513
4513
|
func Closesocket(s Handle) (err error) {
|
|
4514
|
-
r1, _, e1 := syscall.
|
|
4514
|
+
r1, _, e1 := syscall.SyscallN(procclosesocket.Addr(), uintptr(s))
|
|
4515
4515
|
if r1 == socket_error {
|
|
4516
4516
|
err = errnoErr(e1)
|
|
4517
4517
|
}
|
|
@@ -4519,7 +4519,7 @@ func Closesocket(s Handle) (err error) {
|
|
|
4519
4519
|
}
|
|
4520
4520
|
|
|
4521
4521
|
func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
|
|
4522
|
-
r1, _, e1 := syscall.
|
|
4522
|
+
r1, _, e1 := syscall.SyscallN(procconnect.Addr(), uintptr(s), uintptr(name), uintptr(namelen))
|
|
4523
4523
|
if r1 == socket_error {
|
|
4524
4524
|
err = errnoErr(e1)
|
|
4525
4525
|
}
|
|
@@ -4536,7 +4536,7 @@ func GetHostByName(name string) (h *Hostent, err error) {
|
|
|
4536
4536
|
}
|
|
4537
4537
|
|
|
4538
4538
|
func _GetHostByName(name *byte) (h *Hostent, err error) {
|
|
4539
|
-
r0, _, e1 := syscall.
|
|
4539
|
+
r0, _, e1 := syscall.SyscallN(procgethostbyname.Addr(), uintptr(unsafe.Pointer(name)))
|
|
4540
4540
|
h = (*Hostent)(unsafe.Pointer(r0))
|
|
4541
4541
|
if h == nil {
|
|
4542
4542
|
err = errnoErr(e1)
|
|
@@ -4545,7 +4545,7 @@ func _GetHostByName(name *byte) (h *Hostent, err error) {
|
|
|
4545
4545
|
}
|
|
4546
4546
|
|
|
4547
4547
|
func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
|
|
4548
|
-
r1, _, e1 := syscall.
|
|
4548
|
+
r1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
4549
4549
|
if r1 == socket_error {
|
|
4550
4550
|
err = errnoErr(e1)
|
|
4551
4551
|
}
|
|
@@ -4562,7 +4562,7 @@ func GetProtoByName(name string) (p *Protoent, err error) {
|
|
|
4562
4562
|
}
|
|
4563
4563
|
|
|
4564
4564
|
func _GetProtoByName(name *byte) (p *Protoent, err error) {
|
|
4565
|
-
r0, _, e1 := syscall.
|
|
4565
|
+
r0, _, e1 := syscall.SyscallN(procgetprotobyname.Addr(), uintptr(unsafe.Pointer(name)))
|
|
4566
4566
|
p = (*Protoent)(unsafe.Pointer(r0))
|
|
4567
4567
|
if p == nil {
|
|
4568
4568
|
err = errnoErr(e1)
|
|
@@ -4585,7 +4585,7 @@ func GetServByName(name string, proto string) (s *Servent, err error) {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
|
|
4587
4587
|
func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
|
|
4588
|
-
r0, _, e1 := syscall.
|
|
4588
|
+
r0, _, e1 := syscall.SyscallN(procgetservbyname.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)))
|
|
4589
4589
|
s = (*Servent)(unsafe.Pointer(r0))
|
|
4590
4590
|
if s == nil {
|
|
4591
4591
|
err = errnoErr(e1)
|
|
@@ -4594,7 +4594,7 @@ func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
|
|
|
4594
4594
|
}
|
|
4595
4595
|
|
|
4596
4596
|
func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
|
|
4597
|
-
r1, _, e1 := syscall.
|
|
4597
|
+
r1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
|
|
4598
4598
|
if r1 == socket_error {
|
|
4599
4599
|
err = errnoErr(e1)
|
|
4600
4600
|
}
|
|
@@ -4602,7 +4602,7 @@ func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
|
|
|
4602
4602
|
}
|
|
4603
4603
|
|
|
4604
4604
|
func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
|
|
4605
|
-
r1, _, e1 := syscall.
|
|
4605
|
+
r1, _, e1 := syscall.SyscallN(procgetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)))
|
|
4606
4606
|
if r1 == socket_error {
|
|
4607
4607
|
err = errnoErr(e1)
|
|
4608
4608
|
}
|
|
@@ -4610,7 +4610,7 @@ func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int3
|
|
|
4610
4610
|
}
|
|
4611
4611
|
|
|
4612
4612
|
func listen(s Handle, backlog int32) (err error) {
|
|
4613
|
-
r1, _, e1 := syscall.
|
|
4613
|
+
r1, _, e1 := syscall.SyscallN(proclisten.Addr(), uintptr(s), uintptr(backlog))
|
|
4614
4614
|
if r1 == socket_error {
|
|
4615
4615
|
err = errnoErr(e1)
|
|
4616
4616
|
}
|
|
@@ -4618,7 +4618,7 @@ func listen(s Handle, backlog int32) (err error) {
|
|
|
4618
4618
|
}
|
|
4619
4619
|
|
|
4620
4620
|
func Ntohs(netshort uint16) (u uint16) {
|
|
4621
|
-
r0, _, _ := syscall.
|
|
4621
|
+
r0, _, _ := syscall.SyscallN(procntohs.Addr(), uintptr(netshort))
|
|
4622
4622
|
u = uint16(r0)
|
|
4623
4623
|
return
|
|
4624
4624
|
}
|
|
@@ -4628,7 +4628,7 @@ func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *
|
|
|
4628
4628
|
if len(buf) > 0 {
|
|
4629
4629
|
_p0 = &buf[0]
|
|
4630
4630
|
}
|
|
4631
|
-
r0, _, e1 := syscall.
|
|
4631
|
+
r0, _, e1 := syscall.SyscallN(procrecvfrom.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
|
|
4632
4632
|
n = int32(r0)
|
|
4633
4633
|
if n == -1 {
|
|
4634
4634
|
err = errnoErr(e1)
|
|
@@ -4641,7 +4641,7 @@ func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (
|
|
|
4641
4641
|
if len(buf) > 0 {
|
|
4642
4642
|
_p0 = &buf[0]
|
|
4643
4643
|
}
|
|
4644
|
-
r1, _, e1 := syscall.
|
|
4644
|
+
r1, _, e1 := syscall.SyscallN(procsendto.Addr(), uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
|
|
4645
4645
|
if r1 == socket_error {
|
|
4646
4646
|
err = errnoErr(e1)
|
|
4647
4647
|
}
|
|
@@ -4649,7 +4649,7 @@ func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (
|
|
|
4649
4649
|
}
|
|
4650
4650
|
|
|
4651
4651
|
func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
|
|
4652
|
-
r1, _, e1 := syscall.
|
|
4652
|
+
r1, _, e1 := syscall.SyscallN(procsetsockopt.Addr(), uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen))
|
|
4653
4653
|
if r1 == socket_error {
|
|
4654
4654
|
err = errnoErr(e1)
|
|
4655
4655
|
}
|
|
@@ -4657,7 +4657,7 @@ func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32
|
|
|
4657
4657
|
}
|
|
4658
4658
|
|
|
4659
4659
|
func shutdown(s Handle, how int32) (err error) {
|
|
4660
|
-
r1, _, e1 := syscall.
|
|
4660
|
+
r1, _, e1 := syscall.SyscallN(procshutdown.Addr(), uintptr(s), uintptr(how))
|
|
4661
4661
|
if r1 == socket_error {
|
|
4662
4662
|
err = errnoErr(e1)
|
|
4663
4663
|
}
|
|
@@ -4665,7 +4665,7 @@ func shutdown(s Handle, how int32) (err error) {
|
|
|
4665
4665
|
}
|
|
4666
4666
|
|
|
4667
4667
|
func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
|
|
4668
|
-
r0, _, e1 := syscall.
|
|
4668
|
+
r0, _, e1 := syscall.SyscallN(procsocket.Addr(), uintptr(af), uintptr(typ), uintptr(protocol))
|
|
4669
4669
|
handle = Handle(r0)
|
|
4670
4670
|
if handle == InvalidHandle {
|
|
4671
4671
|
err = errnoErr(e1)
|
|
@@ -4674,7 +4674,7 @@ func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
|
|
|
4674
4674
|
}
|
|
4675
4675
|
|
|
4676
4676
|
func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {
|
|
4677
|
-
r1, _, e1 := syscall.
|
|
4677
|
+
r1, _, e1 := syscall.SyscallN(procWTSEnumerateSessionsW.Addr(), uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)))
|
|
4678
4678
|
if r1 == 0 {
|
|
4679
4679
|
err = errnoErr(e1)
|
|
4680
4680
|
}
|
|
@@ -4682,12 +4682,12 @@ func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessio
|
|
|
4682
4682
|
}
|
|
4683
4683
|
|
|
4684
4684
|
func WTSFreeMemory(ptr uintptr) {
|
|
4685
|
-
syscall.
|
|
4685
|
+
syscall.SyscallN(procWTSFreeMemory.Addr(), uintptr(ptr))
|
|
4686
4686
|
return
|
|
4687
4687
|
}
|
|
4688
4688
|
|
|
4689
4689
|
func WTSQueryUserToken(session uint32, token *Token) (err error) {
|
|
4690
|
-
r1, _, e1 := syscall.
|
|
4690
|
+
r1, _, e1 := syscall.SyscallN(procWTSQueryUserToken.Addr(), uintptr(session), uintptr(unsafe.Pointer(token)))
|
|
4691
4691
|
if r1 == 0 {
|
|
4692
4692
|
err = errnoErr(e1)
|
|
4693
4693
|
}
|