Beispiel #1
0
KEXPORT void UnhookAfsReplace()
{
	MasterUnhookFunction(code[C_NEWFILEFROMAFS_CS], afsNewFileFromAFS);
	MasterUnhookFunction(code[C_ALLOCATEBUFFERS_CS], afsAllocateBuffers);
	
	// free all file buffers
	for (g_FilesIterator = g_Files.begin(); g_FilesIterator != g_Files.end();
				g_FilesIterator++) {
		try {
			LogWithNumber(&k_kload, "Buffer with %d bytes was still allocated!", 
										(g_FilesIterator->second)->replaceSize);
			makeReplaceBuffer(0, g_FilesIterator->second);
			HeapFree(GetProcessHeap(),0,(void*)g_FilesIterator->second);
		} catch (...) {}
	}
	g_Files.clear();
	
	DeleteCriticalSection(&_ar_cs);
	return;
}
Beispiel #2
0
//--------------------------------------------------------------------------------------
CLASS_IMPL_FUNC_T(D3D10_Factory, void, clear)(
	_X_ void)
{
	g_D3D10Texture_Container.clear();
}