नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'function': could not resolve event
Remarks
function could not resolve which event to call.
Examples
The following example generates C3723:
// C3723.cpp
struct A {
// To resolve, comment void f(int); and uncomment the __event function
void f(int);
// __event void f(int);
void f(float);
};
struct B {
void g(int);
B(A* a) {
__hook(&A::f, a, &B::g); // C3723
}
};
int main() {
}
__hook and __unhook are not compatible with /clr programming. Use the += and -= operators instead.
The following example generates C3723:
// C3723b.cpp
// compile with: /clr
using namespace System;
public delegate void delegate1();
public ref class CPSource {
public:
event delegate1^ event1;
};
public ref class CReceiver {
public:
void Handler1() {
}
void UnhookAll(CPSource^ pSrc) {
__unhook(&CPSource::event1, pSrc, &CReceiver::Handler1); // C3723
// Try the following line instead.
// pSrc->event1 -= gcnew delegate1(this, &CReceiver::Handler1);
}
};
int main() {
}