Bazaar developer reference

CvDllBuildingInfo::QueryInterface(GUID)

Defined in
CvDllBuildingInfo.cpp, line 22
Class
CvDllBuildingInfo
Hook name
CivHooks::CvDllBuildingInfo_QueryInterface

Hooks

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

Code

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

Calls