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.

129 lines
5.4 KiB

  1. ///*M*
  2. // INTEL CORPORATION PROPRIETARY INFORMATION
  3. // This software is supplied under the terms of a licence agreement or
  4. // nondisclosure agreement with Intel Corporation and may not be copied
  5. // or disclosed except in accordance with the terms of that agreement.
  6. // Copyright (c) 1997 Intel Corporation. All Rights Reserved.
  7. //
  8. // Filename : CBTimer.idl
  9. // Purpose : Defines the ICBTimer interface in IDL to compile to .h files.
  10. // Contents : ICBTimer interface specification.
  11. // ICBCallback interface specification.
  12. //*M*/
  13. //*I*
  14. // Name : ICBTimer
  15. // Purpose : Defines this interface, which is used to register an
  16. // object for callbacks, setup callbacks, and delay callbacks.
  17. // Context : This interface is used by any COM object that wishes to
  18. // schedule callbacks.
  19. // Notes : All of the methods exposed by this interface are
  20. // backed by a mutex which may timeout. This avoids
  21. // potential deadlock problems. An application using
  22. // a CBTimer object should be prepared for methods
  23. // to return unsuccessfully due to such timeouts.
  24. //*I*/
  25. [
  26. object,
  27. uuid(CD117003-7004-11D0-9CCF-00A0C9081C19),
  28. helpstring("ICBTimer Interface"),
  29. pointer_default(unique)
  30. ]
  31. interface ICBTimer : IUnknown
  32. {
  33. import "oaidl.idl";
  34. // This method is used to register an object to receive callbacks from
  35. // the CBTimer object. An IUnknown for the object is passed in as well as
  36. // a context variable which is returned with all callbacks. A CBTimer object
  37. // can only track one registered object at a time, so if an object wishes to
  38. // change the dwObjectContext value, it needs to call UnRegisterObject()
  39. // first, followed by RegisterObject() again.
  40. HRESULT RegisterObject(
  41. [in] IUnknown *pIUnknown, // Pointer to the IUnknown of the object
  42. // which wishes to receive callbacks.
  43. // Will be QI'd for the ICBTimerCallback interface
  44. // defined below.
  45. [in] DWORD *pdwObjectContext); // This is an uninterpreted context
  46. // value that is returned with all callbacks
  47. // to this address.
  48. // Request a callback for the object registered via RegisterObject().
  49. // Multiple callbacks may be registered.
  50. HRESULT RequestCallback(
  51. [in] DWORD dwDelay, // Delay, in milliseconds, from the current
  52. // time, after which a callback is requested to occur.
  53. [in] DWORD *pdwCallbackContext, // This is an uninterpreted context
  54. // value that is returned with the callback
  55. // returned for this particular duration.
  56. [out] DWORD **ppdwCallbackID); // A nonce which identifies this callback,
  57. // which can be used by the app to cancel the callback.
  58. // Cancel the indicated callback.
  59. HRESULT CancelCallback(
  60. [in] DWORD *pdwCallbackID); // Cancel a callback previously requested
  61. // via RequestCallback().
  62. // Change the delay and context value for this callback.
  63. HRESULT DelayCallback(
  64. [in] DWORD *pdwCallbackID, // A nonce which identifies this callback
  65. [in] DWORD dwDelay, // New delay, in milliseconds, from the current
  66. // time, after which a callback is requested to occur.
  67. [in] DWORD *pdwCallbackContext); // This is an uninterpreted context
  68. // value that is returned with the callback
  69. // returned for this particular duration.
  70. // Cancel all callbacks for this object and release any interfaces held.
  71. HRESULT UnRegisterObject(void);
  72. }; // End interface ICBTimer.
  73. //*I*
  74. // Name : ICBCallback
  75. // Purpose : Defines this interface, which is used to deliver
  76. // callbacks registered via the ICBTimer interface.
  77. // Context : This interface is queried for the by the CBTimer
  78. // COM object in response to a call to ICBTimer::RegisterObject().
  79. // This interface is called when a callback scheduled via
  80. // ICBTimer::RequestCallback() occurs.
  81. //*I*/
  82. [
  83. object,
  84. uuid(CD117008-7004-11D0-9CCF-00A0C9081C19),
  85. helpstring("ICBCallback Interface"),
  86. pointer_default(unique)
  87. ]
  88. interface ICBCallback : IUnknown
  89. {
  90. import "oaidl.idl";
  91. // This method is used to deliver a callback after a timeout occurs.
  92. HRESULT Callback(
  93. [in] DWORD *pdwObjectContext, // This is the uninterpreted context
  94. // value that is set in RegisterObject().
  95. [in] DWORD *pdwCallbackContext); // This is the uninterpreted context
  96. // value that is set in RequestCallback().
  97. }; // ICBCallback Interface definition
  98. [
  99. uuid(C8801950-AC9D-11d0-82A1-00AA00B5CA1B),
  100. version(1.0),
  101. helpstring("CBTimer 1.0 Type Library")
  102. ]
  103. library CBTIMERLib
  104. {
  105. importlib("stdole2.tlb");
  106. [
  107. uuid(CD117007-7004-11D0-9CCF-00A0C9081C19),
  108. helpstring("CBTimer Class")
  109. ]
  110. coclass CCBTimer
  111. {
  112. [default] interface ICBTimer;
  113. [default, source] interface ICBCallback;
  114. };
  115. };
  116.