Bazaar developer reference

CvDllPromotionInfo::QueryInterface(GUID)

Defined in
CvDllPromotionInfo.cpp, line 24
Class
CvDllPromotionInfo
Hook name
CivHooks::CvDllPromotionInfo_QueryInterface

Hooks

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

Code

24void* CvDllPromotionInfo::QueryInterface(GUID guidInterface)25{26	if(guidInterface == ICvUnknown::GetInterfaceId() ||27	        guidInterface == ICvPromotionInfo1::GetInterfaceId())28	{29		IncrementReference();30		return this;31	}3233	return NULL;34}

Calls