home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / corpub.idl < prev    next >
Encoding:
Text File  |  2000-06-23  |  5.3 KB  |  203 lines

  1. /* -------------------------------------------------------------------------- *
  2.  * COM+ Runtime Process Publishing Interfaces
  3.  * (C) 1999 Microsoft
  4.  * -------------------------------------------------------------------------- */
  5.  
  6. cpp_quote("#if 0")
  7. #ifndef DO_NO_IMPORTS
  8. #ifdef _WIN64
  9. import "unknwn.idl";
  10. #else
  11. #include "basetsd.h"
  12. #endif
  13. import "wtypes.idl";
  14. import "unknwn.idl";
  15. #endif
  16. cpp_quote("#endif")
  17.  
  18. typedef enum
  19. {
  20.     COR_PUB_MANAGEDONLY                 = 0x00000001
  21. } COR_PUB_ENUMPROCESS;
  22.  
  23.  
  24. /* -------------------------------------------------------------------------- *
  25.  * Forward declarations
  26.  * -------------------------------------------------------------------------- */
  27. interface ICorPublish;
  28. interface ICorPublishProcess;
  29. interface ICorPublishAppDomain;
  30. interface ICorPublishProcessEnum;
  31. interface ICorPublishAppDomainEnum;
  32.  
  33.  
  34. /* ------------------------------------------------------------------------- *
  35.  * Library defintion
  36.  * ------------------------------------------------------------------------- */
  37.  
  38. [
  39.   uuid(e97ca460-657d-11d3-8d5b-00104b35e7ef),
  40.   version(1.0),
  41.   helpstring("Com+ Runtime Process Publishing Library")
  42. ]
  43. library CorpubProcessLib
  44. {
  45.     importlib("STDOLE2.TLB");
  46.  
  47.     [
  48.         uuid(047a9a40-657e-11d3-8d5b-00104b35e7ef)
  49.     ]
  50.     coclass CorpubPublish
  51.     {
  52.         [default] interface ICorPublish;
  53.         interface            ICorPublishProcess;
  54.         interface            ICorPublishAppDomain;
  55.         interface            ICorPublishProcessEnum;
  56.         interface            ICorPublishAppDomainEnum;
  57.     };
  58. };
  59.  
  60.  
  61. /* -------------------------------------------------------------------------- *
  62.  * Interface definitions
  63.  * -------------------------------------------------------------------------- */
  64.  
  65. /*
  66.  * This interface is the top level interface for publishing of processes.
  67.  */
  68. [
  69.     object,
  70.     uuid(9613A0E7-5A68-11d3-8F84-00A0C9B4D50C),
  71.     pointer_default(unique),
  72.     local
  73. ]
  74. interface ICorPublish : IUnknown
  75. {
  76.     /*
  77.      * This method is used to retrieve a list of processes on a given
  78.      * machine.  The list of processes may or may not be managed
  79.      * depending on the filter flags given.  The list is based on a
  80.      * snapshot of the processes running when the enum method is
  81.      * called.  If other processes start or existing ones stop while
  82.      * enumerating, the list will remain the same.
  83.      */
  84.     HRESULT EnumProcesses([in] COR_PUB_ENUMPROCESS Type,
  85.                           [out] ICorPublishProcessEnum **ppIEnum);
  86.  
  87.     HRESULT GetProcess([in] unsigned pid, 
  88.                        [out] ICorPublishProcess **ppProcess);
  89. }
  90.  
  91. /*
  92.  * An abstract enumerator.
  93.  */
  94. [
  95.     object,
  96.     uuid(C0B22967-5A69-11d3-8F84-00A0C9B4D50C),
  97.     pointer_default(unique)
  98. ]
  99. interface ICorPublishEnum : IUnknown
  100. {
  101.     HRESULT Skip([in] ULONG celt);
  102.     HRESULT Reset();
  103.     HRESULT Clone([out] ICorPublishEnum **ppEnum);
  104.     HRESULT GetCount([out] ULONG *pcelt);
  105. };
  106.  
  107.  
  108. /*
  109.  * For a given process on the system, return required information.
  110.  */
  111. [
  112.     object,
  113.     uuid(18D87AF1-5A6A-11d3-8F84-00A0C9B4D50C),
  114.     pointer_default(unique)
  115. ]
  116. interface ICorPublishProcess : IUnknown
  117. {
  118.     /*
  119.      * Returns true if the process is known to have managed code
  120.      * running in it.  Note that this could return false now but true
  121.      * later in the case where managed code was loaded into the
  122.      * process after the enum was built.
  123.      */
  124.     HRESULT IsManaged([out] BOOL *pbManaged);
  125.     
  126.     /*
  127.      * Enumerate the list of known application domains in the target process.
  128.      */
  129.     HRESULT EnumAppDomains([out] ICorPublishAppDomainEnum **ppEnum);
  130.     
  131.     /*
  132.      * Returns the OS ID for the process in question.
  133.      */
  134.     HRESULT GetProcessID([out] unsigned *pid);
  135.     
  136.     /*
  137.      * Get the display name for a process.
  138.      */
  139.     HRESULT GetDisplayName([in] ULONG32 cchName, 
  140.                            [out] ULONG32 *pcchName,
  141.                            [out, size_is(cchName), 
  142.                            length_is(*pcchName)] WCHAR szName[]);
  143. }
  144.  
  145. /*
  146.  * Provide information on an Application Domain object.
  147.  */
  148. [
  149.     object,
  150.     uuid(D6315C8F-5A6A-11d3-8F84-00A0C9B4D50C),
  151.     pointer_default(unique)
  152. ]
  153. interface ICorPublishAppDomain : IUnknown
  154. {
  155.     /*
  156.      * Get the name and ID for an application domain.
  157.      */
  158.     HRESULT GetID([out] ULONG32 *puId);
  159.     
  160.     /*
  161.      * Get the name for an application domain.
  162.      */
  163.     HRESULT GetName([in] ULONG32 cchName, 
  164.                     [out] ULONG32 *pcchName,
  165.                     [out, size_is(cchName), 
  166.                     length_is(*pcchName)] WCHAR szName[]);
  167. }
  168.  
  169.  
  170. /*
  171.  * Enumerate a list of processes based on the filter criteria given
  172.  * when the enumerator object was created.
  173.  */
  174. [
  175.     object,
  176.     uuid(A37FBD41-5A69-11d3-8F84-00A0C9B4D50C),
  177.     pointer_default(unique)
  178. ]
  179. interface ICorPublishProcessEnum : ICorPublishEnum
  180. {
  181.     HRESULT Next([in] ULONG celt,
  182.                  [out, size_is(celt), 
  183.                   length_is(*pceltFetched)] ICorPublishProcess *objects[],
  184.                  [out] ULONG *pceltFetched);
  185. }
  186.  
  187. /*
  188.  * Enumerate a list of app domains based in a process.
  189.  */
  190. [
  191.     object,
  192.     uuid(9F0C98F5-5A6A-11d3-8F84-00A0C9B4D50C),
  193.     pointer_default(unique)
  194. ]
  195. interface ICorPublishAppDomainEnum : ICorPublishEnum
  196. {
  197.     HRESULT Next([in] ULONG celt,
  198.                  [out, size_is(celt), 
  199.                   length_is(*pceltFetched)] ICorPublishAppDomain *objects[],
  200.                  [out] ULONG *pceltFetched);
  201. }
  202.  
  203.