MCPcopy Create free account
hub / github.com/Norbyte/ositools / DllMain

Function DllMain

OsiInterface/dllmain.cpp:197–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197BOOL APIENTRY DllMain( HMODULE hModule,
198 DWORD ul_reason_for_call,
199 LPVOID lpReserved
200 )
201{
202 switch (ul_reason_for_call)
203 {
204 case DLL_PROCESS_ATTACH:
205 if (ShouldRunProxy()) {
206 gDxgiWrapper = std::make_unique<DxgiWrapper>();
207 SetupOsirisProxy(hModule);
208 }
209 break;
210
211 case DLL_PROCESS_DETACH:
212 if (gDxgiWrapper) {
213 osidbg::gOsirisProxy->Shutdown();
214 osidbg::gOsirisProxy.reset();
215 gDxgiWrapper.reset();
216 }
217 break;
218
219 case DLL_THREAD_ATTACH:
220 case DLL_THREAD_DETACH:
221 break;
222 }
223 return TRUE;
224}
225

Callers

nothing calls this directly

Calls 3

ShouldRunProxyFunction · 0.85
SetupOsirisProxyFunction · 0.85
ShutdownMethod · 0.45

Tested by

no test coverage detected