Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • 3 months later...
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...