Exemplo n.º 1
0
static void dllmainProcDetach() {

	hhLoad.restore(true);
	hhLoad.reset();
	hhLoadW.restore(true);
	hhLoadW.reset();

	if (sd)
		UnmapViewOfFile(sd);
	if (hMapObject)
		CloseHandle(hMapObject);
	if (hHookMutex)
		CloseHandle(hHookMutex);
}
Exemplo n.º 2
0
void freeD3D9Hook(HMODULE hModule) {
	HMODULE hD3D = GetModuleHandle("D3D9.DLL");
	if (bHooked && !hD3D) {
		ods("D3D9: Freeing hooks for module %p", hModule);

		hhCreateDevice.reset();
		hhCreateDeviceEx.reset();
		hhReset.reset();
		hhResetEx.reset();
		hhAddRef.reset();
		hhRelease.reset();
		hhPresent.reset();
		hhPresentEx.reset();
		hhSwapPresent.reset();

		bHooked = false;
	}
}