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.

192 lines
4.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998.
  5. //
  6. // File:
  7. // UniSrgt.idl
  8. //
  9. // Contents:
  10. // Definition of (currently) private unified surrogate interfaces
  11. //
  12. // History:
  13. // WilfR 03-31-98 Created
  14. //
  15. //--------------------------------------------------------------------------
  16. cpp_quote("//+-----------------------------------------------------------------")
  17. cpp_quote("//")
  18. cpp_quote("// Microsoft Windows")
  19. cpp_quote("// Copyright (C) Microsoft Corporation, 1992 - 1998.")
  20. cpp_quote("//")
  21. cpp_quote("//------------------------------------------------------------------")
  22. #ifndef DO_NO_IMPORTS
  23. import "wtypes.idl";
  24. import "objidl.idl";
  25. import "unknwn.idl";
  26. #endif
  27. /****************************************************************************
  28. * Surrogate Types *
  29. ****************************************************************************/
  30. //
  31. // ApplicationType
  32. //
  33. typedef enum tagApplicationType
  34. {
  35. ServerApplication,
  36. LibraryApplication
  37. } ApplicationType;
  38. //
  39. // ShutdownType
  40. //
  41. typedef enum tagShutdownType
  42. {
  43. IdleShutdown,
  44. ForcedShutdown
  45. } ShutdownType;
  46. /****************************************************************************
  47. * Surrogate Services Interfaces *
  48. ****************************************************************************/
  49. //
  50. // IProcessLock
  51. //
  52. [
  53. object,
  54. local,
  55. uuid(000001d5-0000-0000-C000-000000000046),
  56. pointer_default(unique)
  57. ]
  58. interface IProcessLock : IUnknown
  59. {
  60. ULONG AddRefOnProcess();
  61. ULONG ReleaseRefOnProcess();
  62. }
  63. //
  64. // ISurrogateService
  65. //
  66. [
  67. object,
  68. local,
  69. uuid(000001d4-0000-0000-C000-000000000046),
  70. pointer_default(unique)
  71. ]
  72. interface ISurrogateService : IUnknown
  73. {
  74. HRESULT Init( [in] REFGUID rguidProcessID,
  75. [in] IProcessLock* pProcessLock,
  76. [out] BOOL* pfApplicationAware );
  77. HRESULT ApplicationLaunch( [in] REFGUID rguidApplID,
  78. [in] ApplicationType appType );
  79. HRESULT ApplicationFree( [in] REFGUID rguidApplID );
  80. HRESULT CatalogRefresh( [in] ULONG ulReserved );
  81. HRESULT ProcessShutdown( [in] ShutdownType shutdownType );
  82. }
  83. //
  84. // ISurrogateService2
  85. //
  86. [
  87. object,
  88. local,
  89. uuid(000001da-0000-0000-C000-000000000046),
  90. pointer_default(unique)
  91. ]
  92. interface ISurrogateService2 : ISurrogateService
  93. {
  94. HRESULT PauseProcess();
  95. HRESULT ResumeProcess();
  96. }
  97. /****************************************************************************
  98. * OLE32 Interface *
  99. ****************************************************************************/
  100. //
  101. // IPAControl
  102. //
  103. [
  104. object,
  105. local,
  106. uuid(000001d2-0000-0000-C000-000000000046),
  107. pointer_default(unique)
  108. ]
  109. interface IPAControl : IUnknown
  110. {
  111. ULONG AddRefOnProcess();
  112. ULONG ReleaseRefOnProcess();
  113. void PendingInit();
  114. void ServicesReady();
  115. HRESULT SuspendApplication( [in] REFGUID rguidApplID );
  116. HRESULT PendingApplication( [in] REFGUID rguidApplID );
  117. HRESULT ResumeApplication( [in] REFGUID rguidApplID );
  118. HRESULT SuspendAll();
  119. HRESULT ResumeAll();
  120. HRESULT ForcedShutdown();
  121. HRESULT SetIdleTimeoutToZero();
  122. }
  123. /****************************************************************************
  124. * COMSVCS Interfaces *
  125. ****************************************************************************/
  126. //
  127. // IServicesSink
  128. //
  129. [
  130. object,
  131. local,
  132. uuid(000001d3-0000-0000-C000-000000000046),
  133. pointer_default(unique)
  134. ]
  135. interface IServicesSink : IUnknown
  136. {
  137. void ApplicationLaunch( [in] REFGUID rguidApplID,
  138. [in] ApplicationType appType );
  139. void ApplicationFree( [in] REFGUID rguidApplID );
  140. void ProcessFree();
  141. HRESULT PauseApplication();
  142. HRESULT ResumeApplication();
  143. }
  144. /****************************************************************************
  145. * Surrogate APIs *
  146. ****************************************************************************/
  147. //
  148. // CoRegisterSurrogateEx
  149. //
  150. // Note: For now we re-use the ISurrogate interface -- The LoadDllServer
  151. // method will never be called.
  152. //
  153. cpp_quote ("STDAPI CoRegisterSurrogateEx (REFGUID rguidProcessID, ")
  154. cpp_quote (" ISurrogate* pSrgt); ")
  155. //
  156. // CoLoadServices
  157. //
  158. cpp_quote ("STDAPI CoLoadServices (REFGUID rguidProcessID, ")
  159. cpp_quote (" IPAControl* pPAControl, ")
  160. cpp_quote (" REFIID riid, void **ppv ); ")
  161. //
  162. // CoLoadServices Function typedef
  163. //
  164. cpp_quote ("typedef HRESULT (STDAPICALLTYPE *FN_CoLoadServices) ")
  165. cpp_quote (" (REFGUID rguidProcessID, ")
  166. cpp_quote (" IPAControl* pPAControl, ")
  167. cpp_quote (" REFIID riid, void **ppv ); ")