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.

785 lines
24 KiB

  1. /*++
  2. UMI_V6.IDL
  3. Universal Management Interfaces for Whistler WMI/DS Providers
  4. v1.01 raymcc 13-Jan-00 Second draft in preparation for meeting with ADSI team
  5. v1.02 raymcc 17-Jan-00 DS long meeting (Sanjes, alanbos, DS team)
  6. v1.03 raymcc 28-Jan-00 Updates after 'type system' meeting
  7. v1.04 raymcc 02-Feb-00 Compilable, slight reorg of COM inheritance
  8. v1.05 raymcc 03-Feb-00 Type system
  9. v1.06 raymcc 11-Feb-00 Type system cleanup after meeting with ADSI team
  10. v1.07 raymcc 15-Feb-00 Minor type system fixes
  11. v1.08 raymcc 22-Feb-00 Ajay's updates to type system
  12. v1.09 alanbos 22-Mar-00 Added IUmiCustomInterfaceFactory
  13. --*/
  14. [uuid(12575a7a-d9db-11d3-a11f-00105a1f515a)]
  15. library UMI_V6
  16. {
  17. importlib("stdole32.tlb");
  18. interface IUmiPropList;
  19. interface IUmiBaseObject;
  20. interface IUmiObject;
  21. interface IUmiConnection;
  22. interface IUmiContainer;
  23. interface IUmiCursor;
  24. interface IUmiObjectSink;
  25. interface IUmiURLKeyList;
  26. interface IUmiURL;
  27. interface IUmiQuery;
  28. interface IUmiCustomInterfaceFactory;
  29. typedef enum tag_UMI_TYPE_ENUMERATION
  30. {
  31. UMI_TYPE_NULL =0,
  32. UMI_TYPE_I1 =1,
  33. UMI_TYPE_I2 =2,
  34. UMI_TYPE_I4 =3,
  35. UMI_TYPE_I8 =4,
  36. UMI_TYPE_UI1 =5,
  37. UMI_TYPE_UI2 =6,
  38. UMI_TYPE_UI4 =7,
  39. UMI_TYPE_UI8 =8,
  40. UMI_TYPE_R4 =9,
  41. UMI_TYPE_R8 =10,
  42. UMI_TYPE_FILETIME =12,
  43. UMI_TYPE_SYSTEMTIME =13,
  44. UMI_TYPE_BOOL =14,
  45. UMI_TYPE_IDISPATCH =15,
  46. UMI_TYPE_IUNKNOWN =16,
  47. UMI_TYPE_VARIANT =17,
  48. UMI_TYPE_LPWSTR =20,
  49. UMI_TYPE_OCTETSTRING =21,
  50. UMI_TYPE_UMIARRAY =22,
  51. UMI_TYPE_DISCOVERY =23,
  52. UMI_TYPE_UNDEFINED =24,
  53. UMI_TYPE_DEFAULT =25,
  54. UMI_TYPE_ARRAY_FLAG =0x2000
  55. } UMI_TYPE_ENUMERATION;
  56. // Allows for combining flags and such
  57. typedef ULONG UMI_TYPE;
  58. typedef enum
  59. {
  60. UMI_GENUS_CLASS = 1,
  61. UMI_GENUS_INSTANCE = 2
  62. } UMI_GENUS_TYPE;
  63. typedef enum
  64. {
  65. UMI_DONT_COMMIT_SECURITY_DESCRIPTOR = 0x10
  66. } UMI_COMMIT_FLAGS;
  67. typedef enum
  68. {
  69. // Which properties to get
  70. UMI_FLAG_GETPROPS_ALL = 1,
  71. UMI_FLAG_GETPROPS_SCHEMA = 0x2,
  72. UMI_MASK_GETPROPS_PROP = 0xFF,
  73. // Extended modifiers (e.g. just names, etc.)
  74. UMI_FLAG_GETPROPS_NAMES = 0x100,
  75. UMI_MASK_GETPROPS_EXT = 0x100
  76. } UMI_GETPROPS_FLAGS;
  77. typedef enum
  78. {
  79. // Return a property list of a property
  80. UMI_FLAG_OWNER_SECURITY_INFORMATION = 0x1,
  81. UMI_FLAG_GROUP_SECURITY_INFORMATION = 0x2,
  82. UMI_FLAG_DACL_SECURITY_INFORMATION = 0x4,
  83. UMI_FLAG_SACL_SECURITY_INFORMATION = 0x8,
  84. UMI_SECURITY_MASK = 0xF,
  85. UMI_FLAG_PROVIDER_CACHE = 0x10,
  86. // Retrieve property based on provider cache
  87. UMI_FLAG_PROPERTY_ORIGIN = 0x20,
  88. // Get the origin class of the property
  89. } UMI_GET_FLAGS;
  90. typedef enum
  91. {
  92. UMI_FLAG_REFRESH_ALL = 0, // Refresh all properties from cache
  93. UMI_FLAG_REFRESH_PARTIAL = 1 // Refresh untouched properties from cache
  94. } UMI_REFRESH_FLAGS;
  95. typedef enum
  96. {
  97. UMI_OPERATION_NONE = 0, // Set when a property is retrieved
  98. UMI_OPERATION_APPEND = 1, // DS supports this
  99. UMI_OPERATION_UPDATE = 2, // DS supports this
  100. UMI_OPERATION_EMPTY = 3, // DS supports this
  101. UMI_OPERATION_INSERT_AT = 4,
  102. UMI_OPERATION_REMOVE_AT = 5,
  103. UMI_OPERATION_DELETE_AT = 6,
  104. UMI_OPERATION_DELETE_FIRST_MATCH = 7, // DS supports this
  105. UMI_OPERATION_DELETE_ALL_MATCHES = 8,
  106. UMI_OPERATION_RESTORE_DEFAULT = 9
  107. } UMI_PROP_INSTRUCTION;
  108. // These flags are used for operations such as Delete, which may apply to instances
  109. // or classes and the path may be abiguous
  110. typedef enum
  111. {
  112. UMI_OPERATION_INSTANCE = 0X1000, // operation is for instance
  113. UMI_OPERATION_CLASS = 0X2000
  114. } UMI_OPERATION_PATH;
  115. typedef enum
  116. {
  117. UMIPATH_CREATE_AS_NATIVE = 0x8000,
  118. UMIPATH_CREATE_AS_EITHER = 0x4000,
  119. UMIPATH_CREATE_ACCEPT_RELATIVE = 0x4,
  120. } tag_UMI_PATH_CREATE_FLAG;
  121. typedef enum tag_WMI_PATH_STATUS_FLAG
  122. {
  123. UMIPATH_INFO_NATIVE_STRING = 0x1, // path was set as native.
  124. UMIPATH_INFO_RELATIVE_PATH = 0x2, // path has null server.
  125. UMIPATH_INFO_INSTANCE_PATH = 0x4, // path has a key and/or value.
  126. UMIPATH_INFO_CLASS_PATH = 0x8,
  127. UMIPATH_INFO_SINGLETON_PATH = 0x10,
  128. } tag_UMI_PATH_STATUS_FLAG;
  129. ///////////////////////////////////////////////////////////////////////
  130. //
  131. // UMI ERROR CODES
  132. /*
  133. Standard codes from WINERROR.H:
  134. S_OK (Zero) Success
  135. E_ACCESS_DENIED Access denied (security violation)
  136. E_NOINTERFACE Interface not available (from QueryInterface only)
  137. E_UNEXPECTED Unhandled internal exception; should not be seen by client code
  138. E_NOTIMPL API is not implemented (this is not to be returned when a feature of the API is not implemented while other parts are)
  139. E_OUTOFMEMORY Insufficient system memory to comply with the request
  140. E_FAIL Generic failure of operation; call IUmiBaseObject::GetCallResult for more detail.
  141. E_INVALIDARG One or more arguments was not valid
  142. */
  143. // UMI-Specific Errors
  144. typedef enum
  145. {
  146. UMI_S_NO_ERROR = 0,
  147. UMI_E_CONNECTION_FAILURE = 0x80041001,
  148. UMI_E_TIMED_OUT = 0x80041002, // Call timed out
  149. UMI_E_TYPE_MISMATCH = 0x80041003, // Wrong value type supplied for a property
  150. UMI_E_NOT_FOUND = 0x80041004, // Object, property, etc. not found
  151. UMI_E_INVALID_FLAGS = 0x80041005, // Flag mask was not a valid combination
  152. UMI_E_UNSUPPORTED_FLAGS = 0x80041006, // Flags valid, but not supported in this case
  153. UMI_E_SYNCHRONIZATION_REQUIRED = 0x80041007, // Internal cache requires a Commit or a Refresh before continuing
  154. UMI_E_UNSUPPORTED_OPERATION = 0x80041008, // Operation is legal but unsupported in this provider
  155. UMI_E_TRANSACTION_FAILURE = 0x80041009, // Transaction failed due to conflict with another transaction or forced rollback at the server
  156. UMI_E_UNBOUND_OBJECT = 0x8004100A // The object is newly created and therefore unbound.
  157. } UMI_STATUS;
  158. ///////////////////////////////////////////////////////////////////////
  159. typedef struct tag_UMI_OCTET_STRING
  160. {
  161. ULONG uLength;
  162. byte *lpValue;
  163. } UMI_OCTET_STRING, *PUMI_OCTET_STRING;
  164. typedef struct tag_UMI_COM_OBJECT
  165. {
  166. IID *priid;
  167. LPVOID pInterface;
  168. } UMI_COM_OBJECT, *PUMI_COM_OBJECT;
  169. typedef union
  170. {
  171. CHAR cValue[1];
  172. UCHAR ucValue[1];
  173. WCHAR wcValue[1];
  174. WORD wValue[1];
  175. DWORD dwValue[1];
  176. LONG lValue[1];
  177. ULONG uValue[1];
  178. BYTE byteValue[1];
  179. BOOL bValue[1];
  180. LPWSTR pszStrValue[1];
  181. FILETIME fileTimeValue[1];
  182. SYSTEMTIME sysTimeValue[1];
  183. double dblValue[1];
  184. unsigned __int64 uValue64[1];
  185. __int64 nValue64[1];
  186. UMI_OCTET_STRING octetStr[1];
  187. UMI_COM_OBJECT comObject[1];
  188. } UMI_VALUE, *PUMI_VALUE;
  189. typedef struct
  190. {
  191. UMI_TYPE uType;
  192. ULONG uCount; // Array fields of UMIVALUE only valid when used with this
  193. ULONG uOperationType;
  194. LPWSTR pszPropertyName;
  195. UMI_VALUE *pUMIValue; // NULL when the value is actually NULL
  196. } UMI_PROPERTY, *PUMI_PROPERTY;
  197. typedef struct
  198. {
  199. ULONG uCount;
  200. UMI_PROPERTY *pPropArray;
  201. } UMI_PROPERTY_VALUES, *PUMI_PROPERTY_VALUES;
  202. ///////////////////////////////////////////////////////////////////////
  203. //***********************************************************************
  204. // ok
  205. [object, local, uuid(12575a7c-d9db-11d3-a11f-00105a1f515a)]
  206. interface IUmiBaseObject : IUmiPropList
  207. {
  208. HRESULT GetLastStatus(
  209. [in] ULONG uFlags,
  210. [out] ULONG *puSpecificStatus,
  211. [in] REFIID riid,
  212. [out, iid_is(riid)] LPVOID *pStatusObj // NULL=don't use
  213. );
  214. // Exports IErrorInfo, IUmiPropList
  215. // Changes after every call to an interface method
  216. HRESULT GetInterfacePropList(
  217. [in] ULONG uFlags, // Overloaded
  218. [out] IUmiPropList **pPropList
  219. );
  220. };
  221. //***************************************************************************
  222. [object, local, uuid(12575a7b-d9db-11d3-a11f-00105a1f515a)]
  223. interface IUmiPropList : IUnknown
  224. {
  225. // This is IUmiObject without the connection implied by Refresh/Commit, etc.
  226. // It represents the property list portion of the object.
  227. HRESULT Put(
  228. [in] LPCWSTR pszName,
  229. [in] ULONG uFlags,
  230. [in] UMI_PROPERTY_VALUES *pProp
  231. );
  232. HRESULT Get(
  233. [in] LPCWSTR pszName,
  234. [in] ULONG uFlags,
  235. [out] UMI_PROPERTY_VALUES **pProp
  236. );
  237. HRESULT GetAt(
  238. [in] LPCWSTR pszName,
  239. [in] ULONG uFlags,
  240. [in] ULONG uBufferLength, // Buffer size in bytes
  241. [out] LPVOID pExistingMem // Single-valued UMI_LPWSTR and numeric types
  242. );
  243. HRESULT GetAs(
  244. [in] LPCWSTR pszName,
  245. [in] ULONG uFlags,
  246. [in] ULONG uCoercionType,
  247. [out] UMI_PROPERTY_VALUES **pProp
  248. );
  249. HRESULT FreeMemory(
  250. ULONG uReserved,
  251. LPVOID pMem
  252. );
  253. HRESULT Delete(
  254. [in] LPCWSTR pszName,
  255. [in] ULONG uFlags
  256. );
  257. // Functions for dealing with multiple properties at one time.
  258. // ===========================================================
  259. HRESULT GetProps(
  260. [in] LPCWSTR *pszNames,
  261. [in] ULONG uNameCount,
  262. [in] ULONG uFlags, // option: UMI_FLAG_GET_NAMES
  263. [out] UMI_PROPERTY_VALUES **pProps
  264. );
  265. // Also used for "GetNames" functionality.
  266. HRESULT PutProps(
  267. [in] LPCWSTR *pszNames, // null-separated, double-null-terminated
  268. [in] ULONG uNameCount,
  269. [in] ULONG uFlags, // PUT_WITH_COMMIT
  270. [in] UMI_PROPERTY_VALUES *pProps
  271. );
  272. HRESULT PutFrom(
  273. [in] LPCWSTR pszName,
  274. [in] ULONG uFlags,
  275. [in] ULONG uBufferLength,
  276. [in] LPVOID pExistingMem
  277. );
  278. };
  279. //*******************************************************************
  280. // NOT CoCreatable; get this from IUmiPath. This interface is used to
  281. // handle the multiple keys available in wmi.
  282. [local, object, uuid(cf779c98-4739-4fd4-a415-da937a599f2f)]
  283. interface IUmiURLKeyList : IUnknown
  284. {
  285. HRESULT GetCount(
  286. [out] ULONG * puKeyCount
  287. );
  288. HRESULT SetKey(
  289. [in, string] LPCWSTR pszName,
  290. [in, string] LPCWSTR pszValue
  291. );
  292. HRESULT GetKey(
  293. [in] ULONG uKeyIx,
  294. [in] ULONG uFlags, // TBD as needed
  295. [in,out] ULONG * puKeyNameBufSize,
  296. [in] LPWSTR pszKeyName, // Set to key name
  297. [in,out] ULONG * puValueBufSize,
  298. [in] LPWSTR pszValue // Set to key value
  299. );
  300. HRESULT RemoveKey(
  301. [in, string] LPCWSTR pszName,
  302. [in] ULONG uFlags
  303. );
  304. HRESULT RemoveAllKeys(
  305. [in] ULONG uFlags
  306. );
  307. // UMIPATH_INFO_IS_GUID <true if guid={}>
  308. HRESULT GetKeysInfo(
  309. [in] ULONG uRequestedInfo,
  310. [out] ULONGLONG *puResponse
  311. );
  312. };
  313. //***********************************************************************
  314. // This is the main interface. It is a blend of the WMIPathParser and the
  315. // DS path cracker interfaces.
  316. [object, local, uuid(12575a7d-d9db-11d3-a11f-00105a1f515a)]
  317. interface IUmiURL : IUnknown
  318. {
  319. // Main functins for getting and setting the path
  320. HRESULT Set([in] long lFlags, [in] LPCWSTR pszText); // see tag_UMI_PATH_CREATE_FLAG
  321. HRESULT Get([in] long lFlags, [in,out] ULONG * puBufSize, [in,string] LPWSTR pszDest);
  322. // Path tests. To be determined. As a minimum, could be used to check for
  323. // validity of created paths.
  324. HRESULT GetPathInfo(
  325. [in] ULONG uRequestedInfo, // zero for now
  326. [out] ULONGLONG *puResponse // see tag_UMI_PATH_STATUS_FLAG
  327. );
  328. // Locator (AKA Server) access
  329. HRESULT SetLocator(
  330. [in, string] LPCWSTR Name
  331. );
  332. HRESULT GetLocator(
  333. [in,out] ULONG * puNameBufLength,
  334. [in, string] LPWSTR pName
  335. );
  336. // Root namespace access. This manipulates the "wmi" or "ds" part.
  337. // =============
  338. HRESULT SetRootNamespace(
  339. [in, string] LPCWSTR Name
  340. );
  341. HRESULT GetRootNamespace(
  342. [in,out] ULONG * puNameBufLength,
  343. [in, out, string] LPWSTR pName
  344. );
  345. // Component access. The leftmost component is 0
  346. HRESULT GetComponentCount(
  347. [out] ULONG *puCount
  348. );
  349. HRESULT SetComponent(
  350. [in] ULONG uIndex,
  351. [in] LPWSTR pszClass
  352. );
  353. HRESULT SetComponentFromText(
  354. [in] ULONG uIndex,
  355. [in] LPWSTR pszText
  356. );
  357. HRESULT GetComponent(
  358. [in] ULONG uIndex,
  359. [in,out] ULONG * puClassNameBufSize,
  360. [in,out] LPWSTR pszClass,
  361. [out] IUmiURLKeyList **pKeyList
  362. );
  363. HRESULT GetComponentAsText(
  364. [in] ULONG uIndex,
  365. [in,out] ULONG * puTextBufSize,
  366. [in,out] LPWSTR pszText
  367. );
  368. HRESULT RemoveComponent(
  369. [in] ULONG uIndex
  370. );
  371. HRESULT RemoveAllComponents(
  372. );
  373. // The rightmost component is treated specially. Both the wmi path parser and ds
  374. // path crackers do this.
  375. HRESULT SetLeafName(
  376. [in, string] LPCWSTR Name
  377. );
  378. HRESULT GetLeafName(
  379. [in,out] ULONG * puBuffLength,
  380. [in, out, string] LPWSTR pszName
  381. );
  382. HRESULT GetKeyList(
  383. [out] IUmiURLKeyList ** pOut
  384. );
  385. HRESULT CreateLeafPart(
  386. [in] long lFlags,
  387. [in, string] LPCWSTR Name
  388. );
  389. HRESULT DeleteLeafPart(
  390. [in] long lFlags
  391. );
  392. };
  393. //***********************************************************************
  394. // ok
  395. [object, local, uuid(12575a7e-d9db-11d3-a11f-00105a1f515a)]
  396. interface IUmiQuery : IUmiBaseObject
  397. {
  398. HRESULT Set(
  399. [in] LPCWSTR pszLanguage,
  400. [in] ULONG uFlags,
  401. [in] LPCWSTR pszText
  402. );
  403. HRESULT GetQuery(
  404. [in, out] ULONG * puLangBufSize,
  405. [in, out] LPWSTR pszLangBuf,
  406. [in, out] ULONG * puQueryTextBufSize,
  407. [in, out] LPWSTR pszQueryTextBuf
  408. );
  409. /* Houses the query properties. Typically, query for
  410. IUmiObject or IUmiObjectMulti, so that all properties
  411. can be retrieved/set/deleted in one call.
  412. */
  413. // Query info also exposed as properties:
  414. // "QUERYTEXT" = "select * from Foo"
  415. // "QUERYLANGUAGE" = "SQL"
  416. };
  417. //***********************************************************************
  418. // ok
  419. [object, local, uuid(5ed7ee26-64a4-11d3-a0da-00105a1f515a)]
  420. interface IUmiCursor : IUmiBaseObject
  421. {
  422. // Timeout settings, etc. available from GetInterfacePropList
  423. HRESULT SetIID([in] REFIID riid);
  424. // IUmiObject by default if you never call this
  425. // Takes effect immediately after
  426. HRESULT Reset();
  427. // Must move to true beginning of enumeration or return E_NOTIMPL
  428. HRESULT Next(
  429. [in] ULONG uNumRequested,
  430. [out] ULONG *puNumReturned,
  431. [out, size_is(uNumRequested), length_is(*puNumReturned)] LPVOID *pObjects
  432. );
  433. HRESULT Count(
  434. [out] ULONG *puNumObjects
  435. );
  436. // May return E_NOTIMPL
  437. HRESULT Previous(
  438. [in] ULONG uFlags,
  439. [out] LPVOID *pObj
  440. );
  441. // May return E_NOTIMPL
  442. };
  443. //***********************************************************************
  444. // ok
  445. [object, local, uuid(5ed7ee20-64a4-11d3-a0da-00105a1f515a)]
  446. interface IUmiConnection : IUmiBaseObject
  447. {
  448. HRESULT Open(
  449. [in] IUmiURL *pURL,
  450. [in] ULONG uFlags,
  451. [in] REFIID TargetIID,
  452. [out, iid_is(TargetIID)] void **ppvRes
  453. );
  454. // Timeouts, etc., are configured using a call to GetInterfaceProps
  455. };
  456. //***********************************************************************
  457. // ok
  458. [object, local, uuid(5ed7ee21-64a4-11d3-a0da-00105a1f515a)]
  459. interface IUmiContainer : IUmiObject
  460. {
  461. HRESULT Open(
  462. [in] IUmiURL *pURL,
  463. [in] ULONG uFlags, // UMI_OPERATION_PATH
  464. [in] REFIID TargetIID,
  465. [out, iid_is(TargetIID)] void **ppvRes
  466. );
  467. /*
  468. HRESULT Get(
  469. [in] IUmiURL *pURL,
  470. [in] ULONG uFlags,
  471. [in] REFIID TargetIID,
  472. [out, iid_is(TargetIID)] void **ppvResult
  473. );
  474. */
  475. HRESULT PutObject(
  476. [in] ULONG uFlags,
  477. [in] REFIID TargetIID,
  478. [in, out, iid_is(TargetIID)] void *pObj
  479. );
  480. // May return E_NOTIMPL, as there is overlap with IUmiObject::Commit
  481. HRESULT DeleteObject(
  482. [in] IUmiURL *pURL,
  483. [in, optional] ULONG uFlags // UMI_OPERATION_PATH
  484. );
  485. HRESULT Create(
  486. [in] IUmiURL *pURL,
  487. [in] ULONG uFlags, // UMI_OPERATION_PATH
  488. [out] IUmiObject **pNewObj
  489. );
  490. HRESULT Move(
  491. [in] ULONG uFlags,
  492. [in] IUmiURL *pOldURL,
  493. [in] IUmiURL *pNewURL
  494. );
  495. HRESULT CreateEnum(
  496. [in] IUmiURL *pszEnumContext, // class name, etc. etc.
  497. [in] ULONG uFlags, // UMI_OPERATION_PATH
  498. [in] REFIID TargetIID,
  499. [out, iid_is(TargetIID)] void **ppvEnum
  500. );
  501. HRESULT ExecQuery(
  502. [in] IUmiQuery *pQuery,
  503. [in] ULONG uFlags,
  504. [in] REFIID TargetIID,
  505. [out, iid_is(TargetIID)] void **ppResult
  506. );
  507. };
  508. //***********************************************************************
  509. // ok
  510. // Since this is a callback, there is little reason to have interface
  511. // properties. Not only that, the minimum implementation is too heavy;
  512. // this interface is supposed to be implemented by the client side,
  513. // so deriving from IUmiBaseObject is too much.
  514. //
  515. [object, local, uuid(5ed7ee24-64a4-11d3-a0da-00105a1f515a)]
  516. interface IUmiObjectSink : IUnknown
  517. {
  518. HRESULT Put(
  519. [in] LONG lNumObjects,
  520. [in, size_is(lNumObjects)] IUmiObject **ppObjects
  521. );
  522. HRESULT SetResult(
  523. [in] HRESULT hResStatus,
  524. [in] ULONG uFlags,
  525. [in] IUnknown *pObject // QI for IErrorInfo, IUmiObject, etc.
  526. );
  527. };
  528. //***********************************************************************
  529. // ok
  530. [object, local, uuid(5ed7ee23-64a4-11d3-a0da-00105a1f515a)]
  531. interface IUmiObject : IUmiBaseObject
  532. {
  533. // Get/Put is on IUmiBaseObject
  534. HRESULT Clone(
  535. [in] ULONG uFlags,
  536. [in] REFIID riid,
  537. [out, iid_is(riid)] LPVOID *pCopy
  538. );
  539. /*
  540. Clones the current object exactly, including any connections and alternate interfaces, if possible.
  541. <uFlags> = should this allow cloning of entire connections or just the IUmiObject/PropList part, etc?
  542. */
  543. HRESULT CopyTo(
  544. [in] ULONG uFlags,
  545. [in] IUmiURL *pURL,
  546. [in] REFIID riid,
  547. [out, iid_is(riid)] LPVOID *pCopy
  548. );
  549. HRESULT Refresh(
  550. [in] ULONG uFlags,
  551. [in] ULONG uNameCount,
  552. [in] LPWSTR *pszNames
  553. );
  554. HRESULT Commit(
  555. [in] ULONG uFlags
  556. );
  557. /*
  558. uFlags == CREATE_ONLY UPDATE_ONLY CREATE_OR_UDPATE = 0 (default)
  559. */
  560. // Security Descriptor is a standard property, not an API
  561. };
  562. [restricted, uuid(d4b21cc2-f2a5-453e-8459-b27f362cb0e0)]
  563. coclass UmiDefURL
  564. {
  565. interface IUmiURL;
  566. };
  567. //***********************************************************************
  568. //
  569. // This should always be QI'able from IUmiObject. It is not derived from
  570. // IUmiBaseObject since we assume that that functionality is taken care of
  571. // by IUmiObject.
  572. [object, local, uuid(14CD599E-2BE7-4c6f-B95B-B150DCD93585)]
  573. interface IUmiCustomInterfaceFactory : IUnknown
  574. {
  575. // Returns matching CLSID for requested IID
  576. HRESULT GetCLSIDForIID (
  577. [in] REFIID riid, // IID to match on
  578. [in] long lFlags, // Reserved. Must be 0
  579. [in, out] CLSID *pCLSID // returned CLSID
  580. );
  581. // Creates (possibly aggregated) object of given CLSID and returns interface
  582. HRESULT GetObjectByCLSID (
  583. [in] CLSID clsid, // The CLSID to create
  584. [in] IUnknown *pUnkOuter, // Outer unknown for aggregation
  585. [in] DWORD dwClsContext, // Context for running executable code
  586. [in] REFIID riid, // Requested interface
  587. [in] long lFlags, // Reserved. Must be 0
  588. [out, iid_is(riid)] void **ppInterface // Returned interface
  589. );
  590. // Provides DISPIDs for Names and the CLSID for the object that supports them
  591. HRESULT GetCLSIDForNames(
  592. [in, size_is(cNames)] LPOLESTR * rgszNames,
  593. [in] UINT cNames,
  594. [in] LCID lcid,
  595. [out, size_is(cNames)] DISPID * rgDispId,
  596. [in] long lFlags, // Reserved. Must be 0
  597. [in, out] CLSID *pCLSID // The supporting CLSID (if found)
  598. );
  599. };
  600. };
  601.