Bazaar developer reference

CvDllInterfaceModeInfo::QueryInterface(GUID)

Defined in
CvDllInterfaceModeInfo.cpp, line 23
Class
CvDllInterfaceModeInfo
Hook name
CivHooks::CvDllInterfaceModeInfo_QueryInterface

Hooks

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

Code

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

Calls