unhook must have at least 3 arguments for NGWS runtime events
The __unhook function must take three parameters when used in a program that is compiled for the NGWS run time.
The following sample generates C3744:
#using <mscorlib.dll> using namespace System; __delegate(multicast) void delegate1(); [ event_source(com+) ] public __gc class CPSource { public: __event delegate1* event1; }; [event_receiver(com+)] public __gc class CReceiver { public: void Handler1() { } void UnhookAll1(CPSource* pSrc, CReceiver* pRec) { pRec; __unhook(pSrc); // C3744 // The following line resolves the error. // __unhook(&CPSource::event1, pSrc, &CReceiver::Handler1); } }; void main() { }