Archived

This topic is now archived and is closed to further replies.

edwinnie

__delegates across multiple projects

Recommended Posts

okok i was fiddling ard with managed c++.net delegates. i couldnt seem to get them working across 2 different projects. suppose project 1: //somewhere in NameSpace1 public __delegate MyEventHandler(); //somewhere in a class public __gc class MyEventSource { __event MyEventHandler* OnMyEvent(); }; then in project 2: public __gc class MyEventReceiver { //somewhere during initialisation myEventSource->OnMyEvent += new MyEventHandler(this, MyEventReceiver::MyCallBack); }; i got a couple of weird errors, cannot convert parameter 1 from ''NameSpace1::MyEventHandler __gc *'' to ''NameSpace1::MyEventSource::__Delegate_OnMyEvent __gc *'' any one tried such form of delegates yet? much help is greatly appreciated. thx! Edwinz

Share this post


Link to post
Share on other sites