/*============================================================================= FUNCTION: OEMAlarm_QueryInterface DESCRIPTION: Query for an interface of IAlarm. PARAMETERS: IAlarm *po: Pointer to IAlarm instance. AEECLSID iid: Interface ID void **ppo: Pointer to queried object. RETURN VALUE: SUCCESS or ECLASSNOTSUPPORT COMMENTS: SIDE EFFECTS: SEE ALSO: =============================================================================*/ static int OEMAlarm_QueryInterface(IAlarm *po, AEECLSID iid, void **ppo) { if ((NULL == po) || (NULL == ppo)) { return EFAILED; } switch(iid) { case AEECLSID_QUERYINTERFACE: case AEECLSID_ALARM: *ppo = (void*)po; (void) IQI_AddRef(*ppo); return SUCCESS; default: break; } /* Default case: We don't know what they mean by their classid */ return ECLASSNOTSUPPORT; }
uint32 AEEBase_AddRef(AEEBase *po) { return IQI_AddRef(po->pMe); }