Troubles with EventPipe Interfaces

Discussion created by Leonardo78 on Dec 12, 2013
Latest reply on Dec 13, 2013 by Leonardo78



I've found some of your interesting tutorials regarding event handling on a EventPipe, in order to retrieve infos about PIPoints whose values changed over time.


Therefore i obtained this simple code:  

PISDK.PointList pointList = new PISDK.PointList();
PISDK.EventPipe eventPipe = pointList.Data.EventPipe;
PISDK._DEventPipeEvents_Event dEventPipeEvents_Event = eventPipe .Events;
dEventPipeEvents_Event.OnNewValue += new PISDK._DEventPipeEvents_OnNewValueEventHandler(NewItemHandlingMethod);

  On the second to last line i get this exception: 

Unable to cast COM object of type 'System.__ComObject' to interface type 'PISDK._EventPipeEvents'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9E679FD4-DE8C-11D3-853F-00C04F45D1DA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Do you have any clue about that?


I thought i could have an out-of-date version of the OsiSoft.PISDK.dll library, mine is v1.3.0.0 which should be pretty new.




Any help would be appreciated.




Best regards