ActiveSync (Active, Listen, etc) events are remembered

May 11, 2010 at 2:01 PM


The moment I create an instance of RAPI, like:

RAPI ra = new RAPI();

the ActiveSync events (Active, Listen, Answer, IPChange) are fired, even though the code has not reach the part where I subscribe to the events, ie:

ra.ActiveSync.Active += new ActiveHandler(ActiveSync_Active);

I don't get it, what is going? Is RAPI caching events or what? It's crazy, it's like once I've subscribed to the events I can't get rid of them.

I even rebooted the PC thinking it might reset ActiveSync in someway, plus VS 2008, and RAPI - but it didn't work. I rebuilt the app from scratch, no use.

I tried setting the events to null, no use.

I tried:

ra.ActiveSync.Active -= new ActiveHandler(ActiveSync_Active); use.

I've never seen this kind of behavior anywhere else.

Please help someone, this is driving me nuts.