Skip to content

Commit

Permalink
Fix URFW auto-init reference to EnsureIsLoaded() (#2501)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrusTheAxe authored May 12, 2022
1 parent 9af4316 commit 883570f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// the WindowsAppSDK runtime DLL and thus gets loaded when
// the including PE file gets loaded.

STDAPI UndockedRegFreeWinRT_EnsureIsLoaded();
STDAPI WindowsAppRuntime_EnsureIsLoaded();

namespace Microsoft::Windows::Foundation::UndockedRegFreeWinRT
{
Expand All @@ -34,7 +34,7 @@ namespace Microsoft::Windows::Foundation::UndockedRegFreeWinRT
exit(HRESULT_FROM_WIN32(lastError));
}
#else
(void) UndockedRegFreeWinRT_EnsureIsLoaded();
(void) WindowsAppRuntime_EnsureIsLoaded();
#endif
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.Windows.Foundation.UndockedRegFreeWinRTCS
internal static class NativeMethods
{
[DllImport("Microsoft.WindowsAppRuntime.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
internal static extern int UndockedRegFreeWinRT_EnsureIsLoaded();
internal static extern int WindowsAppRuntime_EnsureIsLoaded();
}

class AutoInitialize
Expand All @@ -21,7 +21,7 @@ internal static void AccessWindowsAppSDK()
// It's the act of calling the function causing the DllImport to load the DLL that
// matters. This provides the moral equivalent of a native DLL's Import Address
// Table (IAT) have an entry that's resolved when this module is loaded.
NativeMethods.UndockedRegFreeWinRT_EnsureIsLoaded();
NativeMethods.WindowsAppRuntime_EnsureIsLoaded();
}
}
}

0 comments on commit 883570f

Please sign in to comment.