Пример #1
0
func linkFlags(linkflags LinkFlags_t) (result []byte) {
	result, _, _ = genbin.Write(linkflags.HasLinkTargetIDList,
		linkflags.HasLinkInfo,
		linkflags.HasLinkTargetIDList,
		linkflags.HasLinkInfo,
		linkflags.HasName,
		linkflags.HasRelativePath,
		linkflags.HasWorkingDir,
		linkflags.HasArguments,
		linkflags.HasIconLocation,
		linkflags.IsUnicode,
		false,
		linkflags.HasExpString,
		linkflags.RunInSeparateProcess,
		false,
		linkflags.HasDarwinID,
		linkflags.RunAsUser,
		linkflags.HasExpIcon,
		linkflags.NoPidlAlias,
		false,
		linkflags.RunWithShimLayer,
		linkflags.ForceNoLinkTrack,
		linkflags.EnableTargetMetadata,
		linkflags.DisableLinkPathTracking,
		linkflags.DisableKnownFolderTracking,
		linkflags.DisableKnownFolderAlias,
		linkflags.AllowLinkToLink,
		linkflags.UnaliasOnSave,
		linkflags.PreferEnvironmentPath,
		linkflags.KeepLocalIDListForUNCTarget,
		[5]bool{false, false, false, false, false})
	return
}
Пример #2
0
func ExampleWrite(t *testing.T) {
	var a, b, c, d, e, f, g, h, i bool
	var aa, bb, cc, dd, ee []bool
	a = false
	b = true
	c = false
	d = true
	e = true
	f = true
	g = false
	h = true
	i = true
	aa = []bool{true, false, true}
	bb = []bool{true, false, true}
	cc = []bool{true, false, true}
	dd = []bool{true, false, true}
	ee = []bool{true, false, true}

	result, nb, err := genbin.Write(aa,
		a,
		b,
		c,
		d,
		e,
		f,
		g,
		h,
		i,
		bb,
		cc,
		dd,
		ee)

	fmt.Println(result, nb, err)
}
Пример #3
0
func fileAttribute(a FileAttributes_t) (result []byte) {
	var reserved [17]byte
	result, _, _ = genbin.Write(
		a.FILE_ATTRIBUTE_READONLY,
		a.FILE_ATTRIBUTE_HIDDEN,
		a.FILE_ATTRIBUTE_SYSTEM,
		false,
		a.FILE_ATTRIBUTE_DIRECTORY,
		a.FILE_ATTRIBUTE_ARCHIVE,
		false,
		a.FILE_ATTRIBUTE_NORMAL,
		a.FILE_ATTRIBUTE_TEMPORARY,
		a.FILE_ATTRIBUTE_SPARSE_FILE,
		a.FILE_ATTRIBUTE_REPARSE_POINT,
		a.FILE_ATTRIBUTE_COMPRESSED,
		a.FILE_ATTRIBUTE_OFFLINE,
		a.FILE_ATTRIBUTE_NOT_CONTENT_INDEXED,
		a.FILE_ATTRIBUTE_ENCRYPTED,
		reserved)
	return
}
Пример #4
0
func TestInterface(t *testing.T) {
	thing := []bool{true, false}
	bools, _, _ := genbin.Write(true, true, false, true, []bool{true, false, true}, &thing)
	fastTest(bools, []byte{219, 0}, t)
}
Пример #5
0
func test() {
	bools, _, _ := genbin.Write(true, false, []bool{true, false})
	fmt.Println(bools)
}