Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,18 @@ public static long zip_source_make_command_bitmap (params SourceCommand[] cmd)
}
return bitmap;
}

[DllImport ("kernel32.dll", SetLastError = true)]
private static extern bool SetDllDirectory (string lpPathName);

static Native ()
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
string executingDirectory = System.IO.Path.GetDirectoryName (typeof(Native).Assembly.Location);
if (Environment.Is64BitProcess) {
SetDllDirectory (System.IO.Path.Combine (executingDirectory, "x64"));
}
}
}
}
}