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 Warning (level 4) C4681

'class' : coclass does not specify a default interface that is an event source

A source interface was not specified for a class.

The following sample generates C4681 and shows one way to resolve it:

// compile with /W4
#include <windows.h>

[module(name="MyModule")];

[ object, uuid(373a1a4c-469b-11d3-a6b0-00c04f79ae8f) ]
__interface IMyIface1
{
   HRESULT f1();
};

[ object, uuid(37331a4c-469b-11d3-a6b0-00c04f79ae8f) ]
__interface IMyIface2
{
   HRESULT f1();
};
// uncomment out the source attribute to resolve this C4681
[ coclass, uuid(373a1a4d-469b-11d3-a6b0-00c04f79ae8f), default(IMyIface1)/*, source(IMyface1)*/] 
class CMyClass
{
};

void main()
{
}