Give slightly more infformation in LoadOrThrow

This commit is contained in:
Morilli 2024-06-18 20:53:46 +02:00
parent 89824bac1c
commit 8abe276829
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@ namespace BizHawk.Common
public IntPtr LoadOrThrow(string dllToLoad)
{
var ret = LoadOrZero(dllToLoad);
return ret != IntPtr.Zero ? ret : throw new InvalidOperationException($"got null pointer from {nameof(LoadLibraryW)}, {GetErrorMessage()}");
return ret != IntPtr.Zero ? ret : throw new InvalidOperationException($"got null pointer from {nameof(LoadLibraryW)} while trying to load {dllToLoad}, {GetErrorMessage()}");
}
public unsafe string GetErrorMessage()