I am trying to handle events of Com object (PCOMM) in .Net. My problem is that when attaching a handler to the event I get the error below.
"Event invocation for COM objects requires event to be attributed with DispIdAttribute"
Sample code:
Private WithEvents p as New AutPSTypeLibrary.AutPS
the above line will throw the above exception on the CreateMainForm procedure.
if I try late binding (AddHandler p.NotifyPSEvent, AddressOf fooBar) it also throws the exception.
A search of google didn't yield a solution. Any help would appreciated.