Bazaar developer reference

CvDllUnit::QueryInterface(GUID)

Defined in
CvDllUnit.cpp, line 26
Class
CvDllUnit
Hook name
CivHooks::CvDllUnit_QueryInterface

Hooks

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

Code

26void* CvDllUnit::QueryInterface(GUID guidInterface)27{28	if(	guidInterface == ICvUnknown::GetInterfaceId()	||29	    guidInterface == ICvUnit1::GetInterfaceId()		||30		guidInterface == ICvUnit2::GetInterfaceId())31	{32		IncrementReference();33		return this;34	}3536	return NULL;37}

Calls