AdoJet.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:8k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //-----------------------------------------------------------------------------
  2. // File: adojet.idl
  3. //
  4. // Copyright: Copyright (c) Microsoft Corporation           
  5. //
  6. // Contents: IDL source for msjro.dll
  7. //
  8. // 
  9. // Comments: This file will be processed by the MIDL tool to
  10. //  produce the type library (adojet.tlb) and marshalling code.
  11. //
  12. //-----------------------------------------------------------------------------
  13. #include "jro.hh"
  14. #include "adodef.h"
  15. // Forwards
  16. interface       IReplica;
  17. coclass         Replica;
  18. interface       Filter;
  19. interface       Filters;
  20. interface IJetEngine;
  21. coclass JetEngine;
  22. #define DISPID_COLLECT  ( -8 )
  23. #define DEFAULT_METHOD id(0)
  24. cpp_quote("#define TARGET_IS_NT40_OR_LATER   1")
  25. [
  26. JRO_TYPELIB_UUID,
  27. version(JRO_VERSION),
  28. helpfile(JRO_HELPFILE),
  29. helpstring(JRO_LIBRARYNAME)
  30. ]
  31. library JRO
  32. {
  33. importlib("stdole32.tlb");
  34. importlib("stdole2.tlb");
  35. importlib("ado10.tlb");
  36. /************************************ Enums **********************************************/
  37. typedef [
  38. uuid(D2D139DF-B6CA-11d1-9F31-00C04FC29D52),
  39. ]
  40. enum ReplicaTypeEnum {
  41. [] jrRepTypeNotReplicable = 0x0000,
  42. [] jrRepTypeDesignMaster = 0x0001,
  43. [] jrRepTypeFull = 0x0002,
  44. [] jrRepTypePartial = 0x0003
  45. } ReplicaTypeEnum;
  46. typedef [
  47. uuid(6877D21A-B6CE-11d1-9F31-00C04FC29D52),
  48. ]
  49. enum VisibilityEnum {
  50. [] jrRepVisibilityGlobal = 0x0001,
  51. [] jrRepVisibilityLocal = 0x0002,
  52. [] jrRepVisibilityAnon = 0x0004
  53. } VisibilityEnum;
  54. typedef [
  55. uuid(B42FBFF6-B6CF-11d1-9F31-00C04FC29D52),
  56. ]
  57. enum UpdatabilityEnum {
  58. [] jrRepUpdFull = 0x0000,
  59. [] jrRepUpdReadOnly = 0x0002
  60. } UpdatabilityEnum;
  61. /*
  62. typedef [
  63. uuid(60C05416-B6D0-11d1-9F31-00C04FC29D52),
  64. ]
  65. enum ReplicationStateEnum {
  66. [] jrRepStateNotReplicable = 0x0000,
  67. [] jrRepStateLocal = 0x0001,
  68. [] jrRepStateReplicated = 0x0002
  69. } ReplicationStateEnum;
  70. */
  71. typedef [
  72. uuid(60C05416-B6D0-11d1-9F31-00C04FC29D52),
  73. ]
  74. enum SyncTypeEnum {
  75. [] jrSyncTypeExport = 0x0001,
  76. [] jrSyncTypeImport = 0x0002,
  77. [] jrSyncTypeImpExp = 0x0003
  78. } SyncTypeEnum;
  79. typedef [
  80. uuid(5EBA3970-061E-11d2-BB77-00C04FAE22DA),
  81. ]
  82. enum SyncModeEnum {
  83. [] jrSyncModeIndirect = 0x0001,
  84. [] jrSyncModeDirect = 0x0002,
  85. [] jrSyncModeInternet = 0x0003
  86. } SyncModeEnum;
  87. typedef [
  88. uuid(72769F94-BF78-11d1-AC4D-00C04FC29F8F),
  89. ]
  90. enum FilterTypeEnum {
  91. [] jrFilterTypeTable = 0x0001,
  92. [] jrFilterTypeRelationship = 0x0002
  93. } FilterTypeEnum;
  94. /******************************* Interfaces **********************************************/
  95. [
  96. object,
  97. uuid(D2D139E0-B6CA-11d1-9F31-00C04FC29D52),
  98. dual,
  99. helpstring("IReplica Interface"),
  100. pointer_default(unique)
  101. ]
  102. interface IReplica : IDispatch
  103. {
  104. import "oaidl.idl";
  105. [
  106. propputref,
  107. helpcontext(jrproActiveConnection)
  108. ]
  109. HRESULT ActiveConnection([in] IDispatch *pconn);
  110.   
  111. [
  112. propput,
  113. helpcontext(jrproActiveConnection)
  114. ]
  115. HRESULT ActiveConnection([in] VARIANT vConn);
  116. [
  117. propget,
  118. helpcontext(jrproActiveConnection)
  119. ]
  120. HRESULT ActiveConnection([out, retval] IDispatch **ppconn);
  121.   [
  122. propget,
  123. helpcontext(jrproConflictFunction)
  124. ]
  125. HRESULT ConflictFunction([out, retval] BSTR *pbstr);
  126. [
  127. propput,
  128. helpcontext(jrproConflictFunction)
  129. ]
  130. HRESULT ConflictFunction([in] BSTR bstr);
  131. [
  132. propget,
  133. helpcontext(jrproConflictTables)
  134. ]
  135. HRESULT ConflictTables([out, retval] ADODB._Recordset **pprset);
  136.   [
  137. propget,
  138. helpcontext(jrproDesignMasterId)
  139. ]
  140. HRESULT DesignMasterId([out, retval] VARIANT *pvar);
  141. [
  142. propput,
  143. helpcontext(jrproDesignMasterId)
  144. ]
  145. HRESULT DesignMasterId([in] VARIANT var);
  146.   [
  147. propget,
  148. helpcontext(jrproPriority)
  149. ]
  150. HRESULT Priority([out, retval] long *pl);
  151.   [
  152. propget,
  153. helpcontext(jrproReplicaId)
  154. ]
  155. HRESULT ReplicaId([out, retval] VARIANT *pvar);
  156.   [
  157. propget,
  158. helpcontext(jrproReplicaType)
  159. ]
  160. HRESULT ReplicaType([out, retval] ReplicaTypeEnum *pl);
  161.   [
  162. propget,
  163. helpcontext(jrproRetentionPeriod)
  164. ]
  165. HRESULT RetentionPeriod([out, retval] long *pl);
  166. [
  167. propput,
  168. helpcontext(jrproRetentionPeriod)
  169. ]
  170. HRESULT RetentionPeriod([in] long l);
  171.   [
  172. propget,
  173. helpcontext(jrproVisibility)
  174. ]
  175. HRESULT Visibility([out, retval] VisibilityEnum *pl);
  176. [
  177. helpcontext(jrmthCreateReplica)
  178. ]
  179. HRESULT CreateReplica(
  180. [in] BSTR replicaName,
  181. [in] BSTR description,
  182. [in, defaultvalue(jrRepTypeFull)] ReplicaTypeEnum replicaType,
  183. [in, defaultvalue(jrRepVisibilityGlobal)] VisibilityEnum visibility,
  184. [in, defaultvalue(-1)] long priority,
  185. [in, defaultvalue(jrRepUpdFull)] UpdatabilityEnum updatability);
  186. [
  187. helpcontext(jrmthGetObjectReplicability)
  188. ]
  189. HRESULT GetObjectReplicability(
  190. [in] BSTR objectName,
  191. [in] BSTR objectType,
  192. [out, retval] VARIANT_BOOL *replicability);
  193. [
  194. helpcontext(jrmthSetObjectReplicability)
  195. ]
  196. HRESULT SetObjectReplicability(
  197. [in] BSTR objectName,
  198. [in] BSTR objectType,
  199. [in] VARIANT_BOOL replicability);
  200. [
  201. helpcontext(jrmthMakeReplicable)
  202. ]
  203. HRESULT MakeReplicable(
  204. [in, defaultvalue("")] BSTR connectionString,
  205. [in, defaultvalue(-1)] VARIANT_BOOL columnTracking);
  206. [
  207. helpcontext(jrmthPopulatePartial)
  208. ]
  209. HRESULT PopulatePartial(
  210. [in] BSTR FullReplica);
  211. [
  212. helpcontext(jrmthSynchronize)
  213. ]
  214. HRESULT Synchronize(
  215. [in] BSTR target,
  216. [in, defaultvalue(jrSyncTypeImpExp)] SyncTypeEnum syncType,
  217. [in, defaultvalue(jrSyncModeIndirect)] SyncModeEnum syncMode);
  218.   [
  219. propget,
  220. helpcontext(jrcolFilters)
  221. ]
  222. HRESULT Filters([out, retval] Filters **ppFilters);
  223. };
  224. //---------------------------------------------------------------------------------------------
  225. [
  226. object,
  227. uuid(D2D139E1-B6CA-11d1-9F31-00C04FC29D52),
  228. dual,
  229. helpstring("Filter Interface"),
  230. pointer_default(unique)
  231. ]
  232. interface Filter : IDispatch
  233. {
  234. import "oaidl.idl";
  235.   [
  236. propget,
  237. helpcontext(jrproTableName)
  238. ]
  239. HRESULT TableName([out, retval] BSTR *pbstr);
  240.   [
  241. propget,
  242. helpcontext(jrproFilterType)
  243. ]
  244. HRESULT FilterType([out, retval] FilterTypeEnum *ptype);
  245.   [
  246. propget,
  247. helpcontext(jrproFilterCriteria)
  248. ]
  249. HRESULT FilterCriteria([out, retval] BSTR *pbstr);
  250. };
  251. //---------------------------------------------------------------------------------------------
  252. [
  253. object,
  254. uuid(D2D139E2-B6CA-11d1-9F31-00C04FC29D52),
  255. dual,
  256. helpstring("Filters Interface"),
  257. pointer_default(unique)
  258. ]
  259. interface Filters : IDispatch
  260. {
  261. import "oaidl.idl";
  262. [
  263. helpcontext(jrmthRefresh)
  264. ]
  265. HRESULT Refresh();
  266. [
  267. restricted, 
  268. id(-4)
  269. ]
  270. HRESULT _NewEnum( [out, retval] IUnknown **ppvObject );
  271. [
  272. propget,
  273. helpcontext(jrproCount)
  274. ]
  275. HRESULT Count( [out, retval]long *c );
  276. [
  277. propget, 
  278. helpcontext(jrmthItem),
  279. DEFAULT_METHOD
  280. ]
  281. HRESULT Item(
  282. [in] VARIANT Index, 
  283. [out, retval] Filter **ppvObject
  284. );
  285. [
  286. helpcontext(jrmthAppend)
  287. ]
  288. HRESULT Append( [in] BSTR tableName,
  289. [in] FilterTypeEnum filterType,
  290. [in] BSTR filterCriteria
  291. );
  292. [
  293. helpcontext(jrmthDelete)
  294. ]
  295. HRESULT Delete( [in] VARIANT Index );
  296. }
  297. //---------------------------------------------------------------------------------------------
  298. [
  299. object,
  300. uuid(9F63D980-FF25-11D1-BB6F-00C04FAE22DA),
  301. dual,
  302. helpstring("IJetEngine Interface"),
  303. pointer_default(unique)
  304. ]
  305. interface IJetEngine : IDispatch
  306. {
  307. import "oaidl.idl";
  308. [
  309. helpcontext(jrmthCompactDatabase)
  310. ]
  311. HRESULT CompactDatabase( [in] BSTR SourceConnection,
  312. [in] BSTR Destconnection
  313. );
  314. [
  315. helpcontext(jrmthRefreshCache)
  316. ]
  317. HRESULT RefreshCache([in] ADODB._Connection* Connection);
  318. }
  319. /******************************* Coclasses **********************************************/
  320. [
  321. uuid(D2D139E3-B6CA-11d1-9F31-00C04FC29D52),
  322. helpstring("JRO Replica Class")
  323. ]
  324. coclass Replica
  325. {
  326. [default] interface IReplica;
  327. };
  328. [
  329. uuid(DE88C160-FF2C-11D1-BB6F-00C04FAE22DA),
  330. helpstring("JRO JetEngine Class")
  331. ]
  332. coclass JetEngine
  333. {
  334. [default] interface IJetEngine;
  335. };
  336. };