Bazaar developer reference

CvDllDealAI::QueryInterface(GUID)

Defined in
CvDllDealAI.cpp, line 26
Class
CvDllDealAI
Hook name
CivHooks::CvDllDealAI_QueryInterface

Hooks

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

Code

26void* CvDllDealAI::QueryInterface(GUID guidInterface)27{28	if(guidInterface == ICvUnknown::GetInterfaceId() ||29	        guidInterface == ICvDealAI1::GetInterfaceId())30	{31		IncrementReference();32		return this;33	}3435	return NULL;36}

Calls