NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C3708

'interface': improper use of __event; must be a member of a compatible event source

The event cannot be used with the chosen event source. To resolve the error, be sure that the event and the source are compatible.

The following sample generates C3708:

#define _ATL_ATTRIBUTES 1
#include "atlbase.h"
#include "atlcom.h"

[module(name="MyLibrary", version="1.2", helpfile="MyHelpFile")];

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

// To fix error, change 'native' to 'com' in the following line:
[event_source(native), coclass ]
struct A {
   __event __interface I;   // C3708
};

void main() {
}