src: dotnet: testing

This commit is contained in:
Bill Zissimopoulos
2017-04-06 23:48:58 -07:00
parent 0cfc730745
commit f219885939
2 changed files with 28 additions and 11 deletions

View File

@ -17,6 +17,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Security.AccessControl;
using System.Runtime.InteropServices;
using System.Security;
@ -679,7 +680,10 @@ namespace Fsp.Interop
{
DllPath = Microsoft.Win32.Registry.GetValue(KeyName, "InstallDir", null) as String;
if (null != DllPath)
Module = LoadLibraryW(DllPath + DllName);
{
DllPath = Path.Combine(DllPath, Path.Combine("bin", DllName));
Module = LoadLibraryW(DllPath);
}
if (IntPtr.Zero == Module)
throw new DllNotFoundException("cannot load " + DllName);
}