aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index ac17038a..18407473 100644
--- a/main.go
+++ b/main.go
@@ -134,6 +134,10 @@ func pipeFromHandleArgument(handleStr string) (*os.File, error) {
}
func main() {
+ if windows.SetDllDirectory("") != nil || windows.SetDefaultDllDirectories(windows.LOAD_LIBRARY_SEARCH_SYSTEM32) != nil {
+ panic("failed to restrict dll search path")
+ }
+
checkForWow64()
if len(os.Args) <= 1 {