Leaked source code of windows server 2003
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.

96 lines
3.9 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 1999 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: appliancetask.idl
  6. //
  7. // Project: Chameleon
  8. //
  9. // Description: Appliance Task Interfaces
  10. //
  11. // Log:
  12. //
  13. // Who When What
  14. // --- ---- ----
  15. // TLP 01/28/1999 Original Version
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18. import "oaidl.idl";
  19. import "ocidl.idl";
  20. //////////////////////////////////////////////////////////////////////////
  21. // IApplianceTask Interface
  22. //////////////////////////////////////////////////////////////////////////
  23. //////////////////////////////////////////////////////////////////////
  24. [public] typedef enum _SA_TASK_RESULT
  25. {
  26. SA_TASK_RESULT_COMMIT,
  27. SA_TASK_RESULT_ROLLBACK
  28. } SA_TASK_RESULT;
  29. //////////////////////////////////////////////////////////////////////
  30. [
  31. object,
  32. uuid(845066C0-B8E2-11D2-A91C-00AA00A71DCA),
  33. dual,
  34. pointer_default(unique)
  35. ]
  36. interface IApplianceTask : IDispatch
  37. {
  38. //////////////////////////////////////////////////////////////////////
  39. //
  40. // Function: OnTaskExecute() - Called to invoke a task executable
  41. //
  42. // Inputs: pTaskContext: Pointer to the ITaskContext interface on the
  43. // object that implements the task context. Note
  44. // that the task context object always contains
  45. // the "TaskId" in its input parameter set. Thus
  46. // Thus a single task executable can participate
  47. // in the execution of multiple tasks by taking
  48. // appropriate action based on the task id.
  49. //
  50. // Outputs: S_OK: Task execution succeeded
  51. //
  52. // FAILED(hr): Unable to complete the task - result in hr
  53. // is returned to the calling application.
  54. //
  55. //////////////////////////////////////////////////////////////////////
  56. [id(1)]
  57. HRESULT OnTaskExecute(
  58. [in] IUnknown* pTaskContext
  59. );
  60. //////////////////////////////////////////////////////////////////////
  61. //
  62. // Function: OnTaskComplete() - Called when a task has completed
  63. //
  64. // Inputs: pTaskContext: Pointer to the ITaskContext interface on the
  65. // object that implements the task context. Note
  66. // that the task context object always contains
  67. // the "TaskId" in its input parameter set. Thus
  68. // Thus a single task executable can participate
  69. // in the execution of multiple tasks.
  70. //
  71. // lTaskResult: Task result. If set to SA_TASK_RESULT_COMMIT
  72. // then task execution was successful. If set
  73. // to SA_TASK_RESULT_ROLLBACK then task exectuion
  74. // failed and the component should rollback any
  75. // changes performed during task execution
  76. // (if appropriate)
  77. //
  78. // Outputs: Task Components should return S_OK
  79. //
  80. //////////////////////////////////////////////////////////////////////
  81. [id(2)]
  82. HRESULT OnTaskComplete(
  83. [in] IUnknown* pTaskContext,
  84. [in] LONG lTaskResult
  85. );
  86. };