예제 #1
0
파일: main.go 프로젝트: AlexisTM/winlnk
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
파일: gen_test.go 프로젝트: AlexisTM/genbin
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
파일: main.go 프로젝트: AlexisTM/winlnk
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
파일: gen_test.go 프로젝트: AlexisTM/genbin
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
파일: generic.go 프로젝트: AlexisTM/winlnk
func test() {
	bools, _, _ := genbin.Write(true, false, []bool{true, false})
	fmt.Println(bools)
}