Bazaar developer reference

CvDllUnitInfo::QueryInterface(GUID)

Defined in
CvDllUnitInfo.cpp, line 22
Class
CvDllUnitInfo
Hook name
CivHooks::CvDllUnitInfo_QueryInterface

Hooks

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

Code

22void* CvDllUnitInfo::QueryInterface(GUID guidInterface)23{24	if(guidInterface == ICvUnknown::GetInterfaceId() ||25	        guidInterface == ICvUnitInfo1::GetInterfaceId())26	{27		IncrementReference();28		return this;29	}3031	return NULL;32}

Calls