Compiler Error C3701

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3701.

function' : event_source has no events

You attempted to use event_source on a class that has no event methods. To fix this error, add one or more events to the class.

The following sample generates C3701:

// C3701.cpp  
[ event_source(native) ]  
class CEventSrc {  
public:  
   // uncomment the following line to resolve this C3701  
   // __event void fireEvent(int i);  
};   // C3701  
  
int main() {  
}  

Show: