Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.8 KiB

  1. // RefClock.idl : IDL source for RefClock.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (RefClock.tlb) and marshalling code.
  5. //=====================================================================
  6. //=====================================================================
  7. // time information
  8. //
  9. // This represents a time (either reference or stream) in 100ns units
  10. // The class library contains a CRefTime helper class
  11. // that supports simple comparison and arithmetic operations
  12. //=====================================================================
  13. //=====================================================================
  14. // Win32 HANDLEs have to be cast to these as the MIDL compiler doesn't
  15. // like the HANDLE type or in fact anything remotely associated with
  16. // them. If this ever gets ported to a MAC environment then these will
  17. // have to become an alertable synchronisation object that it supports
  18. //typedef DWORD_PTR HSEMAPHORE;
  19. //typedef DWORD_PTR HEVENT;
  20. typedef unsigned long HSEMAPHORE;
  21. typedef unsigned long HEVENT;
  22. typedef __int64 REFERENCE_TIME;
  23. typedef double REFTIME;
  24. import "oaidl.idl";
  25. import "ocidl.idl";
  26. [
  27. object,
  28. uuid(56a86897-0ad4-11ce-b03a-0020af0ba770),
  29. helpstring("IReferenceClock Interface"),
  30. pointer_default(unique)
  31. ]
  32. interface IReferenceClock : IUnknown
  33. {
  34. // get the time now
  35. HRESULT GetTime(
  36. [out] REFERENCE_TIME *pTime
  37. );
  38. // ask for an async notification that a time has elapsed
  39. HRESULT AdviseTime(
  40. [in] REFERENCE_TIME baseTime, // base reference time
  41. [in] REFERENCE_TIME streamTime, // stream offset time
  42. [in] HEVENT hEvent, // advise via this event
  43. [out] DWORD_PTR * pdwAdviseCookie // where your cookie goes
  44. );
  45. // ask for an async periodic notification that a time has elapsed
  46. HRESULT AdvisePeriodic(
  47. [in] REFERENCE_TIME startTime, // starting at this time
  48. [in] REFERENCE_TIME periodTime, // time between notifications
  49. [in] HSEMAPHORE hSemaphore, // advise via a semaphore
  50. [out] DWORD_PTR * pdwAdviseCookie // where your cookie goes
  51. );
  52. // cancel a request for notification
  53. HRESULT Unadvise(
  54. [in] DWORD_PTR dwAdviseCookie);
  55. };
  56. [
  57. uuid(600A1B0F-038E-48CD-8EAE-0E2CFA9D0FD4),
  58. version(1.0),
  59. helpstring("RefClock 1.0 Type Library")
  60. ]
  61. library REFCLOCKLib
  62. {
  63. importlib("stdole2.tlb");
  64. [
  65. uuid(CF8767F3-7913-4F90-A279-4CED5BF64B4F),
  66. helpstring("ReferenceClock Class")
  67. ]
  68. coclass ReferenceClock
  69. {
  70. [default] interface IReferenceClock;
  71. };
  72. };