private void AddArchSpecificDirectory() { string archPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, IntPtr.Size == 8 ? "x64" : "Win32"); WINAPI.SetDllDirectory(archPath); }