| 208 | } |
| 209 | |
| 210 | static 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 | |
| 254 | static void WdRoInitializeClasses() |
| 255 | { |
no test coverage detected