MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / UnloadReloadDll

Function UnloadReloadDll

TestCoverageConsole/TestBasic.cpp:60–72  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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}

Callers 1

_tmainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected