home *** CD-ROM | disk | FTP | other *** search
- /* -------------------------------------------------------------------------- *
- * COM+ Runtime Process Publishing Interfaces
- * (C) 1999 Microsoft
- * -------------------------------------------------------------------------- */
-
- cpp_quote("#if 0")
- #ifndef DO_NO_IMPORTS
- #ifdef _WIN64
- import "unknwn.idl";
- #else
- #include "basetsd.h"
- #endif
- import "wtypes.idl";
- import "unknwn.idl";
- #endif
- cpp_quote("#endif")
-
- typedef enum
- {
- COR_PUB_MANAGEDONLY = 0x00000001
- } COR_PUB_ENUMPROCESS;
-
-
- /* -------------------------------------------------------------------------- *
- * Forward declarations
- * -------------------------------------------------------------------------- */
- interface ICorPublish;
- interface ICorPublishProcess;
- interface ICorPublishAppDomain;
- interface ICorPublishProcessEnum;
- interface ICorPublishAppDomainEnum;
-
-
- /* ------------------------------------------------------------------------- *
- * Library defintion
- * ------------------------------------------------------------------------- */
-
- [
- uuid(e97ca460-657d-11d3-8d5b-00104b35e7ef),
- version(1.0),
- helpstring("Com+ Runtime Process Publishing Library")
- ]
- library CorpubProcessLib
- {
- importlib("STDOLE2.TLB");
-
- [
- uuid(047a9a40-657e-11d3-8d5b-00104b35e7ef)
- ]
- coclass CorpubPublish
- {
- [default] interface ICorPublish;
- interface ICorPublishProcess;
- interface ICorPublishAppDomain;
- interface ICorPublishProcessEnum;
- interface ICorPublishAppDomainEnum;
- };
- };
-
-
- /* -------------------------------------------------------------------------- *
- * Interface definitions
- * -------------------------------------------------------------------------- */
-
- /*
- * This interface is the top level interface for publishing of processes.
- */
- [
- object,
- uuid(9613A0E7-5A68-11d3-8F84-00A0C9B4D50C),
- pointer_default(unique),
- local
- ]
- interface ICorPublish : IUnknown
- {
- /*
- * This method is used to retrieve a list of processes on a given
- * machine. The list of processes may or may not be managed
- * depending on the filter flags given. The list is based on a
- * snapshot of the processes running when the enum method is
- * called. If other processes start or existing ones stop while
- * enumerating, the list will remain the same.
- */
- HRESULT EnumProcesses([in] COR_PUB_ENUMPROCESS Type,
- [out] ICorPublishProcessEnum **ppIEnum);
-
- HRESULT GetProcess([in] unsigned pid,
- [out] ICorPublishProcess **ppProcess);
- }
-
- /*
- * An abstract enumerator.
- */
- [
- object,
- uuid(C0B22967-5A69-11d3-8F84-00A0C9B4D50C),
- pointer_default(unique)
- ]
- interface ICorPublishEnum : IUnknown
- {
- HRESULT Skip([in] ULONG celt);
- HRESULT Reset();
- HRESULT Clone([out] ICorPublishEnum **ppEnum);
- HRESULT GetCount([out] ULONG *pcelt);
- };
-
-
- /*
- * For a given process on the system, return required information.
- */
- [
- object,
- uuid(18D87AF1-5A6A-11d3-8F84-00A0C9B4D50C),
- pointer_default(unique)
- ]
- interface ICorPublishProcess : IUnknown
- {
- /*
- * Returns true if the process is known to have managed code
- * running in it. Note that this could return false now but true
- * later in the case where managed code was loaded into the
- * process after the enum was built.
- */
- HRESULT IsManaged([out] BOOL *pbManaged);
-
- /*
- * Enumerate the list of known application domains in the target process.
- */
- HRESULT EnumAppDomains([out] ICorPublishAppDomainEnum **ppEnum);
-
- /*
- * Returns the OS ID for the process in question.
- */
- HRESULT GetProcessID([out] unsigned *pid);
-
- /*
- * Get the display name for a process.
- */
- HRESULT GetDisplayName([in] ULONG32 cchName,
- [out] ULONG32 *pcchName,
- [out, size_is(cchName),
- length_is(*pcchName)] WCHAR szName[]);
- }
-
- /*
- * Provide information on an Application Domain object.
- */
- [
- object,
- uuid(D6315C8F-5A6A-11d3-8F84-00A0C9B4D50C),
- pointer_default(unique)
- ]
- interface ICorPublishAppDomain : IUnknown
- {
- /*
- * Get the name and ID for an application domain.
- */
- HRESULT GetID([out] ULONG32 *puId);
-
- /*
- * Get the name for an application domain.
- */
- HRESULT GetName([in] ULONG32 cchName,
- [out] ULONG32 *pcchName,
- [out, size_is(cchName),
- length_is(*pcchName)] WCHAR szName[]);
- }
-
-
- /*
- * Enumerate a list of processes based on the filter criteria given
- * when the enumerator object was created.
- */
- [
- object,
- uuid(A37FBD41-5A69-11d3-8F84-00A0C9B4D50C),
- pointer_default(unique)
- ]
- interface ICorPublishProcessEnum : ICorPublishEnum
- {
- HRESULT Next([in] ULONG celt,
- [out, size_is(celt),
- length_is(*pceltFetched)] ICorPublishProcess *objects[],
- [out] ULONG *pceltFetched);
- }
-
- /*
- * Enumerate a list of app domains based in a process.
- */
- [
- object,
- uuid(9F0C98F5-5A6A-11d3-8F84-00A0C9B4D50C),
- pointer_default(unique)
- ]
- interface ICorPublishAppDomainEnum : ICorPublishEnum
- {
- HRESULT Next([in] ULONG celt,
- [out, size_is(celt),
- length_is(*pceltFetched)] ICorPublishAppDomain *objects[],
- [out] ULONG *pceltFetched);
- }
-
-