Bazaar developer reference

CvDllGame::QueryInterface(GUID)

Defined in
CvDllGame.cpp, line 35
Class
CvDllGame
Hook name
CivHooks::CvDllGame_QueryInterface

Hooks

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

Code

35void* CvDllGame::QueryInterface(GUID guidInterface)36{37	if(guidInterface == ICvUnknown::GetInterfaceId() ||38		guidInterface == ICvGame1::GetInterfaceId()	 ||39		guidInterface == ICvGame2::GetInterfaceId())40	{41		IncrementReference();42		return this;43	}4445	return NULL;46}

Calls