MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / WdRoInitializeLibraries

Function WdRoInitializeLibraries

projects/WinDurango.KernelX/src/Hooks.cpp:210–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210static void WdRoInitializeLibraries()
211{
212 static std::vector<std::wstring> s_RoLibraryNames = {
213 L"Microsoft.Xbox.GameChat.dll",
214 L"Microsoft.Xbox.Services.dll",
215 L"Microsoft.XBox.Services.dll",
216 L"windows.media.devices.dll",
217 L"SystemUI.Api.dll",
218 L"XboxUI.Api.dll",
219 };
220
221 for (auto name : s_RoLibraryNames)
222 {
223 HMODULE dll = LoadLibraryW(name.c_str());
224 if (dll != nullptr)
225 {
226 if (auto pfn = GetProcAddress(dll, "DllGetActivationFactory"); pfn != nullptr)
227 {
228 g_RoEntryPoints.push_back(reinterpret_cast<PFNGETACTIVATIONFACTORY>(pfn));
229
230 XWinePatchImport(dll, GetRuntimeModule(), "?GetActivationFactoryByPCWSTR@@YAJPEAXAEAVGuid@Platform@@PEAPEAX@Z", GetActivationFactoryRedirect);
231 }
232 }
233 }
234 if (auto dll = LoadLibraryW(L"winrt_x.dll"); dll != nullptr)
235 {
236 if (auto pfn = GetProcAddress(dll, "GetActivationFactory"); pfn != nullptr)
237 {
238 g_RoEntryPoints.push_back(reinterpret_cast<PFNGETACTIVATIONFACTORY>(pfn));
239
240 XWinePatchImport(dll, GetRuntimeModule(), "?GetActivationFactoryByPCWSTR@@YAJPEAXAEAVGuid@Platform@@PEAPEAX@Z", GetActivationFactoryRedirect);
241 }
242 }
243 if (auto dll = LoadLibraryW(L"windows.kinect.dll"); dll != nullptr)
244 {
245 if (auto pfn = GetProcAddress(dll, "GetActivationFactory"); pfn != nullptr)
246 {
247 g_RoEntryPoints.push_back(reinterpret_cast<PFNGETACTIVATIONFACTORY>(pfn));
248
249 XWinePatchImport(dll, GetRuntimeModule(), "?GetActivationFactoryByPCWSTR@@YAJPEAXAEAVGuid@Platform@@PEAPEAX@Z", GetActivationFactoryRedirect);
250 }
251 }
252}
253
254static void WdRoInitializeClasses()
255{

Callers 1

WdRoInitializeFunction · 0.85

Calls 4

GetProcAddressFunction · 0.85
XWinePatchImportFunction · 0.85
GetRuntimeModuleFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected