Bazaar developer reference

CvDllPreGame::QueryInterface(GUID)

Defined in
CvDllPreGame.cpp, line 23
Class
CvDllPreGame
Hook name
CivHooks::CvDllPreGame_QueryInterface

Hooks

static bool BeforeCvDllPreGame_QueryInterface(CvDllPreGame* self, GUID guidInterface, void*& result);static void AfterCvDllPreGame_QueryInterface(CvDllPreGame* self, GUID guidInterface, void*& result);static void* ReplaceCvDllPreGame_QueryInterface(void* (*original)(CvDllPreGame*, GUID), CvDllPreGame* self, GUID guidInterface);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllPreGame_QueryInterface::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllPreGame_QueryInterface);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPreGame_QueryInterface::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllPreGame_QueryInterface);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPreGame_QueryInterface::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllPreGame_QueryInterface);

Code

23void* CvDllPreGame::QueryInterface(GUID guidInterface)24{25	if(guidInterface == ICvUnknown::GetInterfaceId() ||26		guidInterface == ICvPreGame1::GetInterfaceId() ||27		guidInterface == ICvPreGame2::GetInterfaceId())28	{29		return this;30	}3132	return NULL;33}

Calls