Bazaar developer reference

CvDllTerrainInfo::QueryInterface(GUID)

Defined in
CvDllTerrainInfo.cpp, line 23
Class
CvDllTerrainInfo
Hook name
CivHooks::CvDllTerrainInfo_QueryInterface

Hooks

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

Code

23void* CvDllTerrainInfo::QueryInterface(GUID guidInterface)24{25	if(guidInterface == ICvUnknown::GetInterfaceId() ||26	        guidInterface == ICvTerrainInfo1::GetInterfaceId())27	{28		IncrementReference();29		return this;30	}3132	return NULL;33}

Calls