go.mod github.com/Microsoft/hcsshim v0.8.16
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
5
vendor/github.com/Microsoft/hcsshim/internal/regstate/regstate.go
generated
vendored
5
vendor/github.com/Microsoft/hcsshim/internal/regstate/regstate.go
generated
vendored
@ -9,6 +9,7 @@ import (
|
||||
"reflect"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
"golang.org/x/sys/windows/registry"
|
||||
)
|
||||
|
||||
@ -19,7 +20,6 @@ import (
|
||||
const (
|
||||
_REG_OPTION_VOLATILE = 1
|
||||
|
||||
_REG_CREATED_NEW_KEY = 1
|
||||
_REG_OPENED_EXISTING_KEY = 2
|
||||
)
|
||||
|
||||
@ -61,7 +61,8 @@ func createVolatileKey(k *Key, path string, access uint32) (newk *Key, openedExi
|
||||
d uint32
|
||||
)
|
||||
fullpath := filepath.Join(k.Name, path)
|
||||
err = regCreateKeyEx(syscall.Handle(k.Key), syscall.StringToUTF16Ptr(path), 0, nil, _REG_OPTION_VOLATILE, access, nil, &h, &d)
|
||||
pathPtr, _ := windows.UTF16PtrFromString(path)
|
||||
err = regCreateKeyEx(syscall.Handle(k.Key), pathPtr, 0, nil, _REG_OPTION_VOLATILE, access, nil, &h, &d)
|
||||
if err != nil {
|
||||
return nil, false, &os.PathError{Op: "RegCreateKeyEx", Path: fullpath, Err: err}
|
||||
}
|
||||
|
Reference in New Issue
Block a user