Skip to content

Commit

Permalink
Use typeof(Foo).Assembly for faster resolution (#1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 authored Jan 27, 2024
1 parent e8440cf commit 15ac57e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WinRT.Runtime/ActivationFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static bool TryCreate(string fileName, out DllModule module)
#if NET
if (moduleHandle == IntPtr.Zero)
{
NativeLibrary.TryLoad(fileName, Assembly.GetExecutingAssembly(), null, out moduleHandle);
NativeLibrary.TryLoad(fileName, typeof(DllModule).Assembly, null, out moduleHandle);
}
#endif
if (moduleHandle == IntPtr.Zero)
Expand Down

0 comments on commit 15ac57e

Please sign in to comment.