'event': a native event must be a member function
Native events must be member functions.
The following sample generates C3722:
#define _ATL_ATTRIBUTES 1 #include "atlbase.h" #include "atlcom.h" [module(name="MyLibrary", version="1.2", helpfile="MyHelpFile")]; [object] __interface I { HRESULT func1(); }; [event_source(native), coclass] struct A { __event __interface I; // C3722 // try the following line instead // __event func2(); }; void main() { }