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.

256 lines
7.8 KiB

  1. // datastore2.idl : IDL source for datastore2.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (datastore2.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. interface IDataStore2;
  7. interface IDataStoreContainer;
  8. interface IDataStoreObject;
  9. interface IDataStoreProperty;
  10. //////////////////////////////////////////////////////////////////////////
  11. //
  12. // Name: IDataStoreProperty
  13. //
  14. // What: Represents a single property of an abstract data store object.
  15. //
  16. // Purpose: Enable an SDO client to enumerate all the properties of an
  17. // object.
  18. //
  19. //////////////////////////////////////////////////////////////////////////
  20. [
  21. object,
  22. uuid(6BC096C9-0CE6-11D1-BAAE-00C04FC2E20D),
  23. dual
  24. ]
  25. interface IDataStoreProperty : IDispatch
  26. {
  27. [propget, id(1)]
  28. HRESULT Name([out, retval] BSTR* pVal);
  29. [propget, id(2)]
  30. HRESULT Value([out, retval] VARIANT* pVal);
  31. [propget, id(3)]
  32. HRESULT ValueEx([out, retval] VARIANT* pVal);
  33. [propget, id(4)]
  34. HRESULT Owner([out, retval] IDataStoreObject** pVal);
  35. };
  36. //////////////////////////////////////////////////////////////////////////
  37. //
  38. // Name: IDataStoreObject
  39. //
  40. // What: Interface exported by all abstract data store objects.
  41. //
  42. // Purpose: Enable an SDO client to treat the underlying data store
  43. // as an abstract entity
  44. //
  45. //////////////////////////////////////////////////////////////////////////
  46. [
  47. object,
  48. uuid(6BC096C0-0CE6-11D1-BAAE-00C04FC2E20D),
  49. dual,
  50. pointer_default(unique)
  51. ]
  52. interface IDataStoreObject : IDispatch
  53. {
  54. // Retrieves the object's name (unique within collection?)
  55. [propget, id(1)]
  56. HRESULT Name([out, retval] BSTR* pVal);
  57. // Retrieves object's class (table)
  58. [propget, id(2)]
  59. HRESULT Class([out, retval] BSTR* pVal);
  60. // Retrieves obect's unique identifier.
  61. [propget, id(3)]
  62. HRESULT GUID([out, retval] BSTR* pVal);
  63. // Retrieves the object's container
  64. [propget, id(4)]
  65. HRESULT Container([out, retval] IDataStoreContainer** pVal);
  66. // Multi-valued items are retrieved as safearrays
  67. [id(5)]
  68. HRESULT GetValue([in] BSTR bstrName, [out, retval] VARIANT* pVal);
  69. // All items are retrieved as safearrays
  70. [id(6)]
  71. HRESULT GetValueEx([in] BSTR bstrName, [out, retval] VARIANT* pVal);
  72. // Multi-valued items are put as safearrays
  73. [id(7)]
  74. HRESULT PutValue([in] BSTR bstrName, [in] VARIANT* pVal);
  75. // Update the underlying data store with the current state of
  76. // the data store object's interanl buffer
  77. [id(8)]
  78. HRESULT Update();
  79. // Restore the state of the data store object to its last
  80. // persisted state.
  81. [id(9)]
  82. HRESULT Restore();
  83. // The number of properties associated with the object.
  84. [propget, id(10)]
  85. HRESULT Count([out, retval] long* pVal);
  86. // Retrieves the IDataStoreProperty representation of a property.
  87. [id(DISPID_VALUE)]
  88. HRESULT Item([in] BSTR bstrName,
  89. [out, retval] IDataStoreProperty** pVal);
  90. // Returns an IEnumVARIANT that enumerates all the properties.
  91. [propget, restricted, id(DISPID_NEWENUM)]
  92. HRESULT _NewEnum([out, retval] IUnknown** pVal);
  93. };
  94. //////////////////////////////////////////////////////////////////////////
  95. //
  96. // Name: IDataStoreContainer
  97. //
  98. // What: Interface exported by all abstract data store containers.
  99. //
  100. // Purpose: Enable an SDO collection to treat the underlying data store
  101. // collection (container) as an abstract entity
  102. //
  103. //////////////////////////////////////////////////////////////////////////
  104. [
  105. uuid(6BC096C1-0CE6-11D1-BAAE-00C04FC2E20D),
  106. dual,
  107. pointer_default(unique)
  108. ]
  109. interface IDataStoreContainer : IDispatch
  110. {
  111. [propget, restricted, id(DISPID_NEWENUM)]
  112. HRESULT _NewEnum([out, retval] IUnknown** pVal);
  113. // Retrieves the specified item
  114. [id(DISPID_VALUE)]
  115. HRESULT Item([in] BSTR bstrName,
  116. [out, retval] IDataStoreObject** ppObject);
  117. [propget, id(1)]
  118. HRESULT Count([out, retval] long *pVal);
  119. // Create an object of the "class" type supported by this container
  120. [id(2)]
  121. HRESULT Create([in] BSTR bstrClass,
  122. [in] BSTR bstrName,
  123. [out, retval]IDataStoreObject** ppObject);
  124. // Add an object of "class" type. If bstrNewName is non-null, the
  125. // object is renamed.
  126. [id(3)]
  127. HRESULT MoveHere([in] IDataStoreObject* pObject, [in] BSTR bstrNewName);
  128. // Removes the specified item
  129. [id(4)]
  130. HRESULT Remove([in] BSTR bstrClass, [in] BSTR bstrName);
  131. };
  132. //////////////////////////////////////////////////////////////////////////
  133. //
  134. // Name: IDataStore
  135. //
  136. // What: Interface on top of an abstract data store.
  137. //
  138. // Purpose: Enable an SDO client to treat the underlying data store
  139. // as an abstract entity
  140. //
  141. //////////////////////////////////////////////////////////////////////////
  142. [
  143. object,
  144. uuid(6BC096C2-0CE6-11D1-BAAE-00C04FC2E20D),
  145. dual,
  146. pointer_default(unique)
  147. ]
  148. interface IDataStore2 : IDispatch
  149. {
  150. // Get the root object.
  151. [propget]
  152. HRESULT Root([out, retval] IDataStoreObject** ppObject);
  153. // Initialize the data store.
  154. HRESULT Initialize(
  155. [in] BSTR bstrDSName, // Full UNC name of the data source
  156. [in] BSTR bstrUserName, // Can be NULL
  157. [in] BSTR bstrPassword // Can be NULL
  158. );
  159. // Retrieve a specific object from the datastore.
  160. // The path is implementation specific.
  161. HRESULT OpenObject(
  162. [in] BSTR bstrPath,
  163. [out, retval] IDataStoreObject** ppObject
  164. );
  165. // Shutdown the data store
  166. HRESULT Shutdown();
  167. };
  168. [
  169. object,
  170. uuid(F42CFA19-EA06-4EB6-9891-D583F0CE46FC),
  171. oleautomation
  172. ]
  173. interface IAttributeDictionary : IUnknown
  174. {
  175. HRESULT GetDictionary(
  176. [in] BSTR bstrPath,
  177. [out, retval] VARIANT* pVal
  178. );
  179. };
  180. //////////////////////////////////////////////////////////////////////////
  181. //
  182. // Name: IIASNetshJetHelper
  183. //
  184. // What: Interface used by aaaamon.dll (netshell aaaa) to work with Jet
  185. //
  186. // Purpose: That object should always be in a 32bits process to access
  187. // The Jet provider properly
  188. //
  189. //////////////////////////////////////////////////////////////////////////
  190. [
  191. object,
  192. uuid(20290BE7-A2AE-42C2-8883-FA09973ED3A5),
  193. oleautomation,
  194. ]
  195. interface IIASNetshJetHelper : IUnknown
  196. {
  197. // Open the Jet 4 DB
  198. HRESULT OpenJetDatabase(
  199. [in] BSTR Path,
  200. [in] VARIANT_BOOL ReadOnly
  201. );
  202. // Execute a SQL function and return the result (LONG)
  203. HRESULT ExecuteSQLFunction(
  204. [in] BSTR Command,
  205. [out, retval] LONG* Result
  206. );
  207. // Execute a SQL Command.
  208. HRESULT ExecuteSQLCommand(
  209. [in] BSTR Command
  210. );
  211. // Create an empty Jet 4 DB
  212. HRESULT CreateJetDatabase(
  213. [in] BSTR Path
  214. );
  215. // Close the currently opened DB
  216. HRESULT CloseJetDatabase();
  217. // Upgrade the DB
  218. HRESULT UpgradeDatabase();
  219. };