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.

350 lines
12 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998.
  5. //
  6. // File:
  7. // catalog.idl
  8. //
  9. // Contents:
  10. // Definition of catalog interfaces for runtime.
  11. //
  12. // History:
  13. // JimLyon 02-24-98 Created
  14. // a-sergiv 10-25-99 Added IMemoryGate
  15. // jsimmons 03-20-01 Modified IComCatalogSCM to take IUserToken's
  16. // instead of HANDLE's to tokens.
  17. //
  18. //--------------------------------------------------------------------------
  19. #ifndef DO_NO_IMPORTS
  20. import "activate.idl";
  21. import "partitions.idl";
  22. #endif
  23. // IComCatalog: Required interface on catalog object.
  24. [
  25. object,
  26. local,
  27. pointer_default(unique),
  28. uuid(000001E0-0000-0000-C000-000000000046)
  29. ]
  30. interface IComCatalog : IUnknown
  31. {
  32. HRESULT GetClassInfo ([in] REFGUID guidConfiguredClsid, [in] REFIID riid, [out] void** ppv);
  33. HRESULT GetApplicationInfo ([in] REFGUID guidApplId, [in] REFIID riid, [out] void** ppv);
  34. HRESULT GetProcessInfo ([in] REFGUID guidProcess, [in] REFIID riid, [out] void** ppv);
  35. HRESULT GetServerGroupInfo ([in] REFGUID guidServerGroup, [in] REFIID riid, [out] void** ppv);
  36. HRESULT GetRetQueueInfo ([in,string] WCHAR* wszFormatName, [in] REFIID riid, [out] void** ppv);
  37. HRESULT GetApplicationInfoForExe ([in,string] WCHAR* pwszExeName, [in] REFIID riid, [out] void** ppv);
  38. HRESULT GetTypeLibrary ([in] REFGUID guidTypeLib, [in] REFIID riid, [out] void** ppv);
  39. HRESULT GetInterfaceInfo ([in] REFIID iidInterface, [in] REFIID riid, [out] void** ppv);
  40. HRESULT FlushCache();
  41. HRESULT GetClassInfoFromProgId ([in] WCHAR *pwszProgID, [in] REFIID riid, [out] void **ppv);
  42. }
  43. // IComCatalog2: interface on catalog object for partition and application queries
  44. [
  45. object,
  46. local,
  47. pointer_default(unique),
  48. uuid(000001FA-0000-0000-C000-000000000046)
  49. ]
  50. interface IComCatalog2 : IUnknown
  51. {
  52. HRESULT GetClassInfoByPartition ([in] REFGUID guidConfiguredClsid, [in] REFGUID guidPartitionId,
  53. [in] REFIID riid, [out] void** ppv);
  54. HRESULT GetClassInfoByApplication ([in] REFGUID guidConfiguredClsid, [in] REFGUID guidPartitionId,
  55. [in] REFGUID guidApplId, [in] REFIID riid, [out] void** ppv);
  56. HRESULT GetNativeRegistryCatalog([in]REFIID riid, [out]void** ppv);
  57. HRESULT GetNonNativeRegistryCatalog([in]REFIID riid, [out]void** ppv);
  58. }
  59. //REVIEW: Where should these constants REALLY go?
  60. cpp_quote("/* These constants are used in the SCM catalog interfaces */")
  61. cpp_quote("#define CAT_REG64_ONLY (0x10000000)")
  62. cpp_quote("#define CAT_REG32_ONLY (0x20000000)")
  63. cpp_quote("#define CAT_REG_MASK (0x30000000)")
  64. // IComCatalogSCM: Required interface on catalog object.
  65. //
  66. // jsimmons -- modified this interface to take IUserToken's rather than HANDLEs. This
  67. // allows the caller to implement his own token\hive caching scheme.
  68. //
  69. [
  70. object,
  71. local,
  72. pointer_default(unique),
  73. uuid(000001FD-0000-0000-C000-000000000046)
  74. ]
  75. interface IComCatalogSCM : IUnknown
  76. {
  77. HRESULT GetClassInfo ([in] DWORD flags, [in] IUserToken* pToken, [in] REFGUID guidConfiguredClsid, [in] REFIID riid, [out] void** ppv);
  78. HRESULT GetApplicationInfo ([in] IUserToken* pToken, [in] REFGUID guidApplId, [in] REFIID riid, [out] void** ppv);
  79. HRESULT GetProcessInfo ([in] DWORD flags, [in] IUserToken* pToken, [in] REFGUID guidProcess, [in] REFIID riid, [out] void** ppv);
  80. HRESULT GetServerGroupInfo ([in] IUserToken* pToken, [in] REFGUID guidServerGroup, [in] REFIID riid, [out] void** ppv);
  81. HRESULT GetRetQueueInfo ([in] IUserToken* pToken, [in,string] WCHAR* wszFormatName, [in] REFIID riid, [out] void** ppv);
  82. HRESULT GetApplicationInfoForExe ([in] IUserToken* pToken, [in,string] WCHAR* pwszExeName, [in] REFIID riid, [out] void** ppv);
  83. HRESULT GetTypeLibrary ([in] IUserToken* pToken, [in] REFGUID guidTypeLib, [in] REFIID riid, [out] void** ppv);
  84. HRESULT GetInterfaceInfo ([in] IUserToken* pToken, [in] REFIID iidInterface, [in] REFIID riid, [out] void** ppv);
  85. HRESULT FlushCache();
  86. HRESULT GetClassInfoFromProgId ([in] IUserToken* pToken, [in] WCHAR *pwszProgID, [in] REFIID riid, [out] void **ppv);
  87. HRESULT FlushIdleEntries();
  88. }
  89. // IComClassInfo: Required interface on ClassInfo object.
  90. [
  91. object,
  92. local,
  93. pointer_default(unique),
  94. uuid(000001E1-0000-0000-C000-000000000046)
  95. ]
  96. interface IComClassInfo : IUnknown
  97. {
  98. HRESULT GetConfiguredClsid ([out] GUID** ppguidClsid);
  99. HRESULT GetProgId ([out] WCHAR** pwszProgid);
  100. HRESULT GetClassName ([out] WCHAR** pwszClassName);
  101. HRESULT GetApplication ([in] REFIID riid, [out] void** ppv);
  102. HRESULT GetClassContext ([in] CLSCTX clsctxFilter, [out] CLSCTX* pclsctx);
  103. HRESULT GetCustomActivatorCount ([in] ACTIVATION_STAGE activationStage, [out] unsigned long* pulCount);
  104. HRESULT GetCustomActivatorClsids ([in] ACTIVATION_STAGE activationStage, [out] GUID** prgguidClsid);
  105. HRESULT GetCustomActivators ([in] ACTIVATION_STAGE activationStage, [out] ISystemActivator*** prgpActivator);
  106. HRESULT GetTypeInfo ([in] REFIID riid, [out] void** ppv);
  107. HRESULT IsComPlusConfiguredClass ([out] BOOL* pfComPlusConfiguredClass);
  108. HRESULT MustRunInClientContext ([out] BOOL* pbMustRunInClientContext);
  109. HRESULT GetVersionNumber ([out] DWORD *pdwVersionMS, [out] DWORD *pdwVersionLS);
  110. HRESULT Lock (void);
  111. HRESULT Unlock (void);
  112. }
  113. typedef struct tagSOAP_ACTIVATION_INFO
  114. {
  115. BOOL bSoapActivated;
  116. LONG lMode;
  117. BSTR bstrVRoot;
  118. BSTR bstrMailTo;
  119. BSTR bstrAssemblyName;
  120. BSTR bstrTypeName;
  121. BSTR bstrBaseUrl;
  122. } SOAP_ACTIVATION_INFO;
  123. // IComClassInfo2: Interface on ClassInfo object.
  124. [
  125. object,
  126. local,
  127. pointer_default(unique),
  128. uuid(000001E4-0000-0000-C000-000000000046)
  129. ]
  130. interface IComClassInfo2 : IComClassInfo
  131. {
  132. HRESULT IsEnabled([out] BOOL *bEnabled);
  133. HRESULT GetInternalClsid ([out] GUID** ppguidInternalClsid); // the catalog unique CLSID
  134. HRESULT GetApplicationPartitionId ([out] GUID** ppguidAppPartitionId); // the app. partition id for this component
  135. HRESULT MustRunInDefaultContext([out] BOOL *pbMustRunInDefaultContext);
  136. HRESULT IsPrivateComponent([out]BOOL* pbIsPrivateComponent);
  137. HRESULT VBDebugInProgress([out]BOOL* pbVBDebugInProgress);
  138. HRESULT GetSoapInfo ([out] SOAP_ACTIVATION_INFO* psoapActInfo);
  139. HRESULT IsEnabledRemote([out] BOOL *bEnabled);
  140. }
  141. // IClassClassicInfo: Required interface on ClassInfo object.
  142. typedef enum tagThreadingModel
  143. { ApartmentThreaded, FreeThreaded, SingleThreaded, BothThreaded, NeutralThreaded }
  144. ThreadingModel;
  145. typedef enum tagLocalServerType
  146. { LocalServerType16, LocalServerType32 }
  147. LocalServerType;
  148. [
  149. object,
  150. local,
  151. pointer_default(unique),
  152. uuid(000001E2-0000-0000-C000-000000000046)
  153. ]
  154. interface IClassClassicInfo : IUnknown
  155. {
  156. HRESULT GetThreadingModel ([out] ThreadingModel* pthreadmodel);
  157. HRESULT GetModulePath ([in] CLSCTX clsctx, [out, string] WCHAR** pwszDllName);
  158. HRESULT GetImplementedClsid ([out] GUID** ppguidClsid);
  159. HRESULT GetProcess ([in] REFIID riid, [out] void** ppv);
  160. HRESULT GetRemoteServerName ([out] WCHAR** pwszServerName);
  161. HRESULT GetLocalServerType ([out] LocalServerType* pType);
  162. HRESULT GetSurrogateCommandLine ([out] WCHAR** pwszSurrogateCommandLine);
  163. }
  164. // IClassClassicInfo2: Optional interface on ClassInfo object.
  165. [
  166. object,
  167. local,
  168. pointer_default(unique),
  169. uuid(000001df-0000-0000-C000-000000000046)
  170. ]
  171. interface IClassClassicInfo2 : IUnknown
  172. {
  173. HRESULT GetServerExecutable ([out] WCHAR **pwszServerExecutable);
  174. }
  175. // IComServices: Optional interface on ApplicationInfo / ProcessInfo object.
  176. [
  177. object,
  178. local,
  179. pointer_default(unique),
  180. uuid(000001F5-0000-0000-C000-000000000046),
  181. ]
  182. interface IComServices : IUnknown
  183. {
  184. HRESULT GetServicesCount ([out] ULONG* pulCount);
  185. HRESULT GetServicesClsids([out] GUID ** pprgguidClsid);
  186. };
  187. // IComServices2: Optional interface on ApplicationInfo / ProcessInfo object.
  188. [
  189. object,
  190. local,
  191. pointer_default(unique),
  192. uuid(61a7d610-42eb-43d2-a55f-1904d3294daa)
  193. ]
  194. interface IComServices2 : IUnknown
  195. {
  196. HRESULT GetInitializerCount([out] ULONG *pulCount);
  197. HRESULT GetInitializerClsids([out] GUID **pprgguidClsid);
  198. };
  199. // IComProcessInfo: Required interface on ProcessInfo object.
  200. typedef enum tagProcessType
  201. {
  202. ProcessTypeNormal,
  203. ProcessTypeService,
  204. ProcessTypeComPlus,
  205. ProcessTypeLegacySurrogate,
  206. ProcessTypeComPlusService
  207. } ProcessType;
  208. typedef enum tagRunAsType
  209. {
  210. RunAsSpecifiedUser,
  211. RunAsInteractiveUser,
  212. RunAsLaunchingUser
  213. } RunAsType;
  214. enum DCOM_ENDPOINT_FLAGS
  215. {
  216. fUseInternetPorts = 0x00000001
  217. };
  218. typedef struct tagDCOM_ENDPOINT
  219. {
  220. WCHAR* wszProtSeq;
  221. WCHAR* wszPorts;
  222. DWORD dwFlags;
  223. } DCOM_ENDPOINT;
  224. [
  225. object,
  226. local,
  227. pointer_default(unique),
  228. uuid(000001ED-0000-0000-C000-000000000046)
  229. ]
  230. interface IComProcessInfo : IUnknown
  231. {
  232. HRESULT GetProcessId ([out] GUID** ppguidProcessId);
  233. HRESULT GetProcessName ([out] WCHAR** pwszProcessName);
  234. HRESULT GetProcessType ([out] ProcessType* pType);
  235. HRESULT GetSurrogatePath ([out] WCHAR** pwszSurrogatePath);
  236. HRESULT GetServiceName ([out] WCHAR** pwszServiceName);
  237. HRESULT GetServiceParameters ([out] WCHAR** pwszServiceParameters);
  238. HRESULT GetActivateAtStorage ([out] BOOL* pfActivateAtStorage);
  239. HRESULT GetRunAsType ([out] RunAsType* pRunAsType);
  240. HRESULT GetRunAsUser ([out] WCHAR** pwszUserName);
  241. HRESULT GetLaunchPermission ([out] void** ppsdLaunch, [out] DWORD *pdwDescriptorLength);
  242. HRESULT GetAccessPermission ([out] void** ppsdAccess, [out] DWORD *pdwDescriptorLength);
  243. HRESULT GetAuthenticationLevel ([out] DWORD* pdwAuthnLevel);
  244. HRESULT GetImpersonationLevel ([out] DWORD* pdwImpLevel);
  245. HRESULT GetAuthenticationCapabilities ([out] DWORD* pdwAuthenticationCapabilities);
  246. HRESULT GetEndpoints ([out] DWORD* pdwNumEndpoints, [out, size_is( ,*pdwNumEndpoints)] DCOM_ENDPOINT** ppEndPoints);
  247. HRESULT GetRemoteServerName ([out] WCHAR** pwszServerName);
  248. HRESULT SendsProcessEvents ([out] BOOL * pbSendsEvents);
  249. }
  250. [
  251. object,
  252. local,
  253. pointer_default(unique),
  254. uuid(6acfc1bf-3882-45b1-96a3-ab948a267d38)
  255. ]
  256. interface IComProcessInfo2 : IComProcessInfo
  257. {
  258. HRESULT GetManifestLocation([out] WCHAR** wszManifestLocation);
  259. HRESULT GetSaferTrustLevel([out]DWORD* pdwSaferTrustLevel);
  260. }
  261. typedef enum tagResourceGateId
  262. {
  263. CreateProcessMemoryGate,
  264. CreateObjectMemoryGate
  265. } ResourceGateId;
  266. // IResourceGates: Optional interface on ProcessInfo and ClassInfo objects.
  267. [
  268. object,
  269. local,
  270. pointer_default(unique),
  271. uuid(7a0ddd93-7198-4e15-bbd7-427c77b6907a)
  272. ]
  273. interface IResourceGates : IUnknown
  274. {
  275. // Tests that current conditions satisfy the indicated gate
  276. HRESULT Test([in] ResourceGateId id, [out] BOOL *pbResult);
  277. }
  278. // IProcessServerInfo: Required interface on ProcessInfo object.
  279. [
  280. object,
  281. local,
  282. pointer_default(unique),
  283. uuid(000001EE-0000-0000-C000-000000000046)
  284. ]
  285. interface IProcessServerInfo : IUnknown
  286. {
  287. HRESULT GetShutdownIdleTime ([out] unsigned long* pulTime);
  288. HRESULT GetCrmLogFileName ([out] WCHAR** pwszFileName);
  289. HRESULT EnumApplications ([out] IEnumUnknown** ppEnum);
  290. HRESULT EnumRetQueues ([out] IEnumUnknown** ppEnum);
  291. }
  292. // IInterfaceInfo
  293. [
  294. object,
  295. local,
  296. pointer_default(unique),
  297. uuid(000001F7-0000-0000-C000-000000000046)
  298. ]
  299. interface IInterfaceInfo : IUnknown
  300. {
  301. HRESULT GetProxyStubCLSID ([out] GUID** psclsid, [out] BOOL* pfIs16BitPS);
  302. HRESULT GetTypeLibrary ([out] GUID** pLibID, [out] unsigned short* psVersionMajor, [out] unsigned short* psVersionMinor);
  303. HRESULT GetSyncIID ([out] GUID** syncriid);
  304. HRESULT GetAsyncIID ([out] GUID** asyncriid);
  305. HRESULT GetTypeInfo ([in] REFIID riid, [out] void** ppv);
  306. }
  307. // IComCatalogSettings
  308. [
  309. object,
  310. local,
  311. pointer_default(unique),
  312. uuid(000001FF-0000-0000-C000-000000000046)
  313. ]
  314. interface IComCatalogSettings : IUnknown
  315. {
  316. HRESULT RefreshComPlusEnabled();
  317. }
  318. cpp_quote ("STDAPI GetCatalogObject (REFIID riid, void **ppv );")
  319. cpp_quote ("STDAPI GetCatalogObject2 (REFIID riid, void **ppv );")