func ByteSliceFromString(s string) ([]byte, error) {
	if strings.IndexByte(s, 0) != -1 {
		return nil, syscall.EINVAL
	}
	a := make([]byte, len(s)+1)
	copy(a, s)
	return a, nil
}
ByteSliceFromString returns a NUL-terminated slice of bytes
containing the text of s. If s contains a NUL byte at any
location, it returns (nil, syscall.EINVAL).
package windows  
import (
	"bytes"
	"strings"
	"syscall"
	"unsafe"
	"golang.org/x/sys/internal/unsafeheader"
)