Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 766 Bytes

compiler-warning-level-1-c4997.md

File metadata and controls

36 lines (30 loc) · 766 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4997
Compiler Warning (level 1) C4997
11/04/2016
C4997
C4997
d39678fd-0c1a-4104-8a45-9e3f20de0407

Compiler Warning (level 1) C4997

'class': coclass does not implement a COM interface or pseudo-interface

A class marked with the coclass attribute did not implement an interface.

The following sample generates C4997:

// C4997.cpp
// compile with: /WX
// to resolve this C4997, uncomment all code
#include <objbase.h>

[ object ]
__interface I {
   HRESULT func();
};

[ coclass ]
struct C /*: I*/ {
   /*
   HRESULT func() {
      return S_OK;
   }
   */
};   // C4997