הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
'interface': a custom interface that fires COM events cannot inherit from IDispatch
Remarks
An interface that supports COM events cannot inherit from IDispatch. For more information, see Event Handling in COM.
Example
The following error generates C3732:
// C3732.cpp
#define _ATL_ATTRIBUTES 1
#include "atlbase.h"
#include "atlcom.h"
[module(name="test")];
// to resolve this C3732, use dual instead of object
// or inherit from IUnknown
[ object ]
__interface I : IDispatch
{
};
[ event_source(com), coclass ]
struct A
{
__event __interface I; // C3732
};
int main()
{
}