-------------------------------------------------------------------------
| 58 | |
| 59 | //------------------------------------------------------------------------- |
| 60 | void UnloadReloadDll() |
| 61 | { |
| 62 | auto testHelper = L"TestHelper.dll"; |
| 63 | auto module = LoadLibraryEx(testHelper, nullptr, 0); |
| 64 | |
| 65 | // Be sure the library is unloaded by calling FreeLibrary until unload. |
| 66 | while (FreeLibrary(module)); |
| 67 | |
| 68 | module = LoadLibraryEx(testHelper, nullptr, 0); |
| 69 | Tools::ScopedAction freeLibrary{ [=]() { FreeLibrary(module); } }; |
| 70 | |
| 71 | auto fct = (void (*)())GetProcAddress(module, "TestUnloadDll"); |
| 72 | fct(); } |
| 73 | |
| 74 | const std::string ExcludedLine = "For CodeCoverageRunnerTest::ExcludedLine"; |
| 75 | } |