Guest User

Untitled

a guest
Jan 17th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. [Guid("D139A1E0-1B3F-480c-A712-C0066F029D63")]
  2. [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
  3. [ComVisible(true)]
  4. public interface IDBEvents
  5. {
  6. void GetEvents([MarshalAs(UnmanagedType.LPArray)]out EventsResp[] respdata);
  7.  
  8. }
  9.  
  10. [ClassInterface(ClassInterfaceType.None)]
  11. [Guid("A6B5E08B-8E05-47ed-998E-26C10F8A45B1")]
  12. [ProgId("DBEventWrapper.CDBEventsWrapper")]
  13. [ComVisible(true)]
  14. public class CDBEventsWrapper:IDBEvents
  15. {
  16. // Implemented the getevents method here;
  17. }
  18.  
  19. [ComVisible(true)]
  20. [Guid("1C89CA17-75AB-4931-A41E-3D3DE47B7FBC")]
  21. public struct EventsResp
  22. {
  23. public long veMask;
  24. public long eventstate;
  25. public DateTime time;
  26. [MarshalAs(UnmanagedType.LPWStr)]
  27. public string message;
  28. [MarshalAs(UnmanagedType.LPWStr)]
  29. public string srce;
  30. public ulong tType;
  31. public ulong cat;
  32. public ulong sevr;
  33. }
  34.  
  35. Wrapper::EventsResp *events;
  36. Wrapper::IEventsPtr m_Rtdbevents;
  37. m_dbevents..CreateInstance (DBEventWrapper::CLSID_CDBEventsWrapper);
  38. m_dbevents->GetEvents(&events);
Add Comment
Please, Sign In to add comment