Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'function' : dispinterface method must have a dispid
Remarks
If you use a dispinterface method, you must assign it a dispid. To fix this error, assign a dispid to the dispinterface method, for example, by uncommenting the id attribute on the method in the example below. For more information, see the attributes dispinterface and id.
Example
The following example generates C3707:
// C3707.cpp
#include <atlbase.h>
#include <atlcom.h>
#include <atlctl.h>
[module(name="xx")];
[dispinterface]
__interface IEvents : IDispatch
{
HRESULT event1([in] int i); // C3707
// try the following line instead
// [id(1)] HRESULT event1([in] int i);
};
int main() {
}