Bazaar developer reference

CvDllGameContext::QueryInterface(GUID)

Defined in
CvDllContext.cpp, line 102
Class
CvDllGameContext
Hook name
CivHooks::CvDllGameContext_QueryInterface

Hooks

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

Code

102void* CvDllGameContext::QueryInterface(GUID guidInterface)103{104	if(	guidInterface == ICvUnknown::GetInterfaceId() ||105        guidInterface == ICvGameContext1::GetInterfaceId() ||106		guidInterface == ICvGameContext2::GetInterfaceId() ||107		guidInterface == ICvGameContext3::GetInterfaceId())108	{109		return this;110	}111112	return NULL;113}

Calls