Open2

Go+Windows Tips

NoboNoboNoboNobo

特殊パスの取得

main.go
package main

import (
	"log"

	"golang.org/x/sys/windows"
)

func main() {
	log.Println(windows.KnownFolderPath(windows.FOLDERID_Documents, 0))
}

NoboNoboNoboNobo

DLLロード用パスの設定

main.go
package main

import (
	"log"

	"golang.org/x/sys/windows"
)

func main() {
	log.Println(windows.SetDllDirectory(""))
}