STDMETHODIMP InterfaceDiagnostics::PerformTests(IInterfaceDiagnosticResults **pVal) { try { if (!m_pAuthentication) return GetAccessDenied(); if (!m_pAuthentication->GetIsServerAdmin()) return m_pAuthentication->GetAccessDenied(); HM::String str; vector<HM::DiagnosticResult> results = _diagnostics.PerformTests(); CComObject<InterfaceDiagnosticResults>* pResult = new CComObject<InterfaceDiagnosticResults>(); pResult->SetAuthentication(m_pAuthentication); pResult->AttachResults(results); pResult->AddRef(); *pVal = pResult; return S_OK; } catch (...) { return COMError::GenerateGenericMessage(); } }