mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-06 09:07:18 -04:00
Adding VHD library with simple function, updating mksyscall
Adds the basic structs for VHD function calls and includes one simple wrapper for VHDX creation. This includes the updated version of mksyscall_windows.go, which previously assumed any api that doesn't end in "W" must not be unicode, and encodes the strings incorrectly. This hard-codes for unicode support and generates the syscalls from there.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Hard-coding unicode mode for VHD library.
|
||||
|
||||
// +build ignore
|
||||
|
||||
/*
|
||||
@@ -556,8 +558,7 @@ func (f *Fn) HelperCallParamList() string {
|
||||
// IsUTF16 is true, if f is W (utf16) function. It is false
|
||||
// for all A (ascii) functions.
|
||||
func (f *Fn) IsUTF16() bool {
|
||||
s := f.DLLFuncName()
|
||||
return s[len(s)-1] == 'W'
|
||||
return true
|
||||
}
|
||||
|
||||
// StrconvFunc returns name of Go string to OS string function for f.
|
||||
@@ -897,4 +898,4 @@ func {{.HelperName}}({{.HelperParamList}}) {{template "results" .}}{
|
||||
{{define "printtrace"}}{{if .PrintTrace}} print("SYSCALL: {{.Name}}(", {{.ParamPrintList}}") (", {{.Rets.PrintList}}")\n")
|
||||
{{end}}{{end}}
|
||||
|
||||
`
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user