go.mod github.com/Microsoft/hcsshim v0.8.16

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-03-12 17:17:51 +01:00
parent bc856372bb
commit 75b64e0f60
623 changed files with 60114 additions and 6182 deletions

View File

@ -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}
}