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.

1713 lines
53 KiB

  1. /*=--------------------------------------------------------------------------=
  2. * ocdb.h
  3. *=--------------------------------------------------------------------------=
  4. * defines the interfaces and constants for use with the OLE Controls Data
  5. * binding interfaces.
  6. *
  7. * Copyright (c) 1994-1995 Microsoft Corporation, All Rights Reserved.
  8. *
  9. *
  10. * Note: This header file has been modified by Sheridan Software to resolve
  11. * name conflicts with other Microsoft header files. All defines,
  12. * enumerations and structures have been prefixed with "CURSOR_".
  13. *
  14. */
  15. #ifndef __OCDB_H_
  16. #undef Delete
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /* CURSOR_LPDBSTRs are MultiByte in 16bits, and Unicode in 32bits.
  21. */
  22. #if WIN16
  23. #define CURSOR_LPDBSTR LPSTR
  24. #define CURSOR_DBCHAR char
  25. #define CURSOR_ldbstrlen(str) lstrlen(str)
  26. #define CURSOR_ldbstrcpy(a, b) lstrcpy((a), (b))
  27. #define CURSOR_ldbstrcpyn(a,b,n) lstrcpyn((a), (b), (n))
  28. #define CURSOR_ldbstrcmp(a, b) lstrcmp((a), (b))
  29. #define CURSOR_ldbstrcat(a, b) lstrcat((a), (b))
  30. #define CURSOR_ldbstrcmpi(a,b) lstrcmpi((a),(b))
  31. #define CURSOR_DBTEXT(quote) quote
  32. #else
  33. #define CURSOR_LPDBSTR LPWSTR
  34. #define CURSOR_DBCHAR WCHAR
  35. #define CURSOR_ldbstrlen(str) wcslen(str)
  36. #define CURSOR_ldbstrcpy(a, b) wcscpy((a), (b))
  37. #define CURSOR_ldbstrcpyn(a,b,n) wcsncpy((a), (b), (n))
  38. #define CURSOR_ldbstrcmp(a, b) wcscmp((a), (b))
  39. #define CURSOR_ldbstrcat(a, b) wcscat((a), (b))
  40. #define CURSOR_ldbstrcmpi(a,b) wcsicmp((a),(b))
  41. #define CURSOR_DBTEXT(quote) L##quote
  42. #endif /* WIN16 */
  43. typedef CURSOR_LPDBSTR FAR * CURSOR_LPLPDBSTR;
  44. /* Many systems don't have BLOBs defined.
  45. */
  46. #ifndef _tagCURSOR_BLOB_DEFINED
  47. #define _tagCURSOR_BLOB_DEFINED
  48. #define _CURSOR_BLOB_DEFINED
  49. #define _CURSOR_LPBLOB_DEFINED
  50. typedef struct tagCURSOR_BLOB {
  51. ULONG cbSize;
  52. BYTE *pBlobData;
  53. } CURSOR_BLOB, *CURSOR_LPBLOB;
  54. #endif
  55. /*----------------------------------------------------------------------------
  56. *
  57. * dbvar.h
  58. *
  59. *----------------------------------------------------------------------------
  60. */
  61. #ifndef _CURSOR_DBCOLUMNID_DEFINED
  62. #define _CURSOR_DBCOLUMNID_DEFINED
  63. typedef enum tagCURSOR_DBCOLKIND
  64. {
  65. CURSOR_DBCOLKIND_GUID_NAME = 0,
  66. CURSOR_DBCOLKIND_GUID_NUMBER = 1,
  67. CURSOR_DBCOLKIND_NAME = 2
  68. }
  69. CURSOR_DBCOLKIND;
  70. #define CURSOR_GUID_NAMEONLY {0x88c8d398,0x863c,0x101b,{0xac,0x3b,0x00,0xaa,0x00,0x44,0x77,0x3d}}
  71. #define CURSOR_GUID_NUMBERONLY {0x88c8d399,0x863c,0x101b,{0xac,0x3b,0x00,0xaa,0x00,0x44,0x77,0x3d}}
  72. typedef struct tagCURSOR_DBCOLUMNID
  73. {
  74. GUID guid;
  75. CURSOR_DBCOLKIND dwKind;
  76. union
  77. {
  78. LONG lNumber;
  79. CURSOR_LPDBSTR lpdbsz;
  80. }
  81. ;
  82. }
  83. CURSOR_DBCOLUMNID;
  84. #endif /* ndef _CURSOR_COLUMNID_DEFINED */
  85. #ifndef _CURSOR_DBVARENUM_DEFINED
  86. #define _CURSOR_DBVARENUM_DEFINED
  87. enum CURSOR_DBVARENUM
  88. {
  89. CURSOR_DBTYPE_EMPTY = 0,
  90. CURSOR_DBTYPE_NULL = 1,
  91. CURSOR_DBTYPE_I2 = 2,
  92. CURSOR_DBTYPE_I4 = 3,
  93. CURSOR_DBTYPE_I8 = 20,
  94. CURSOR_DBTYPE_R4 = 4,
  95. CURSOR_DBTYPE_R8 = 5,
  96. CURSOR_DBTYPE_CY = 6,
  97. CURSOR_DBTYPE_DATE = 7,
  98. CURSOR_DBTYPE_BOOL = 11,
  99. CURSOR_DBTYPE_HRESULT = 25,
  100. CURSOR_DBTYPE_LPSTR = 30,
  101. CURSOR_DBTYPE_LPWSTR = 31,
  102. CURSOR_DBTYPE_FILETIME = 64,
  103. CURSOR_DBTYPE_BLOB = 65,
  104. CURSOR_DBTYPE_UUID = 72,
  105. CURSOR_DBTYPE_DBEXPR = 503,
  106. CURSOR_DBTYPE_UI2 = 504,
  107. CURSOR_DBTYPE_UI4 = 505,
  108. CURSOR_DBTYPE_UI8 = 506,
  109. CURSOR_DBTYPE_COLUMNID = 507,
  110. CURSOR_DBTYPE_BYTES = 508,
  111. CURSOR_DBTYPE_CHARS = 509,
  112. CURSOR_DBTYPE_WCHARS = 510,
  113. CURSOR_DBTYPE_ANYVARIANT = 511
  114. }
  115. ;
  116. #endif /* ndef _CURSOR_DBVARENUM_DEFINED */
  117. #define CURSOR_DBTYPE_EXT 0x100
  118. #define CURSOR_DBTYPE_VECTOR 0x1000
  119. typedef struct tagCURSOR_DBVARIANT CURSOR_DBVARIANT;
  120. struct FARSTRUCT tagCURSOR_DBVARIANT {
  121. VARTYPE vt;
  122. unsigned short wReserved1;
  123. unsigned short wReserved2;
  124. unsigned short wReserved3;
  125. union {
  126. unsigned char bVal; /* VT_UI1 */
  127. short iVal; /* VT_I2 */
  128. long lVal; /* VT_I4 */
  129. float fltVal; /* VT_R4 */
  130. double dblVal; /* VT_R8 */
  131. #pragma warning(disable: 4237)
  132. VARIANT_BOOL bool; /* (obsolete) */
  133. #pragma warning(default: 4237)
  134. VARIANT_BOOL boolVal; /* VT_BOOL */
  135. SCODE scode; /* VT_ERROR */
  136. CY cyVal; /* VT_CY */
  137. DATE date; /* VT_DATE */
  138. BSTR bstrVal; /* VT_BSTR */
  139. IUnknown FAR* punkVal; /* VT_UNKNOWN */
  140. IDispatch FAR* pdispVal; /* VT_DISPATCH */
  141. SAFEARRAY FAR* parray; /* VT_ARRAY|* */
  142. unsigned char FAR* pbVal; /* VT_BYREF|VT_UI1 */
  143. short FAR* piVal; /* VT_BYREF|VT_I2 */
  144. long FAR* plVal; /* VT_BYREF|VT_I4 */
  145. float FAR* pfltVal; /* VT_BYREF|VT_R4 */
  146. double FAR* pdblVal; /* VT_BYREF|VT_R8 */
  147. VARIANT_BOOL FAR* pbool; /* VT_BYREF|VT_BOOL */
  148. SCODE FAR* pscode; /* VT_BYREF|VT_ERROR */
  149. CY FAR* pcyVal; /* VT_BYREF|VT_CY */
  150. DATE FAR* pdate; /* VT_BYREF|VT_DATE */
  151. BSTR FAR* pbstrVal; /* VT_BYREF|VT_BSTR */
  152. IUnknown FAR* FAR* ppunkVal; /* VT_BYREF|VT_UNKNOWN */
  153. IDispatch FAR* FAR* ppdispVal; /* VT_BYREF|VT_DISPATCH */
  154. SAFEARRAY FAR* FAR* pparray; /* VT_BYREF|VT_ARRAY|* */
  155. VARIANT FAR* pvarVal; /* VT_BYREF|VT_VARIANT */
  156. void FAR* byref; /* Generic ByRef */
  157. // types new to CURSOR_DBVARIANTs
  158. //
  159. CURSOR_BLOB blob; /* VT_BLOB */
  160. CURSOR_DBCOLUMNID *pColumnid; /* CURSOR_DBTYPE_COLUMNID */
  161. LPSTR pszVal; /* VT_LPSTR */
  162. #if WIN32
  163. LPWSTR pwszVal; /* VT_LPWSTR */
  164. LPWSTR FAR *ppwszVal; /* VT_LPWSTR|VT_BYREF */
  165. #endif /* WIN32 */
  166. CURSOR_BLOB FAR *pblob; /* VT_BYREF|VT_BLOB */
  167. CURSOR_DBCOLUMNID **ppColumnid; /* VT_BYREF|CURSOR_DBTYPE_COLUMNID */
  168. CURSOR_DBVARIANT *pdbvarVal; /* VT_BYREF|CURSOR_DBTYPE_VARIANT */
  169. }
  170. #if defined(NONAMELESSUNION) || (defined(_MAC) && !defined(__cplusplus) && !defined(_MSC_VER))
  171. u
  172. #endif
  173. ;
  174. };
  175. /*----------------------------------------------------------------------------
  176. *
  177. * dbs.h
  178. *
  179. *----------------------------------------------------------------------------
  180. */
  181. typedef enum tagCURSOR_DBROWFETCH
  182. {
  183. CURSOR_DBROWFETCH_DEFAULT = 0,
  184. CURSOR_DBROWFETCH_CALLEEALLOCATES = 1,
  185. CURSOR_DBROWFETCH_FORCEREFRESH = 2
  186. }
  187. CURSOR_DBROWFETCH;
  188. typedef struct tagCURSOR_DBFETCHROWS
  189. {
  190. ULONG cRowsRequested;
  191. DWORD dwFlags;
  192. VOID HUGEP *pData;
  193. VOID HUGEP *pVarData;
  194. ULONG cbVarData;
  195. ULONG cRowsReturned;
  196. }
  197. CURSOR_DBFETCHROWS;
  198. #define CURSOR_DB_NOMAXLENGTH (DWORD)0
  199. #define CURSOR_DB_NOVALUE (DWORD)0xFFFFFFFF
  200. #define CURSOR_DB_NULL (DWORD)0xFFFFFFFF
  201. #define CURSOR_DB_EMPTY (DWORD)0xFFFFFFFE
  202. #define CURSOR_DB_USEENTRYID (DWORD)0xFFFFFFFD
  203. #define CURSOR_DB_CANTCOERCE (DWORD)0xFFFFFFFC
  204. #define CURSOR_DB_TRUNCATED (DWORD)0xFFFFFFFB
  205. #define CURSOR_DB_UNKNOWN (DWORD)0xFFFFFFFA
  206. #define CURSOR_DB_NOINFO (DWORD)0xFFFFFFF9
  207. typedef enum tagCURSOR_DBBINDING
  208. {
  209. CURSOR_DBBINDING_DEFAULT = 0,
  210. CURSOR_DBBINDING_VARIANT = 1,
  211. CURSOR_DBBINDING_ENTRYID = 2
  212. }
  213. CURSOR_DBBINDING;
  214. typedef enum tagCURSOR_DBBINDTYPE
  215. {
  216. CURSOR_DBBINDTYPE_DATA = 0,
  217. CURSOR_DBBINDTYPE_ENTRYID = 1,
  218. CURSOR_DBBDINTYPE_EITHER = 2,
  219. CURSOR_DBBINDTYPE_BOTH = 3
  220. }
  221. CURSOR_DBBINDTYPE;
  222. typedef struct tagCURSOR_DBCOLUMNBINDING
  223. {
  224. CURSOR_DBCOLUMNID columnID;
  225. ULONG obData;
  226. ULONG cbMaxLen;
  227. ULONG obVarDataLen;
  228. ULONG obInfo;
  229. DWORD dwBinding;
  230. DWORD dwDataType;
  231. }
  232. CURSOR_DBCOLUMNBINDING;
  233. typedef struct tagCURSOR_DBBINDPARAMS
  234. {
  235. ULONG cbMaxLen;
  236. DWORD dwBinding;
  237. DWORD dwDataType;
  238. ULONG cbVarDataLen;
  239. DWORD dwInfo;
  240. void *pData;
  241. }
  242. CURSOR_DBBINDPARAMS;
  243. #define CURSOR_CID_NUMBER_INVALID -1
  244. #define CURSOR_CID_NUMBER_AUTOINCREMENT 0
  245. #define CURSOR_CID_NUMBER_BASECOLUMNNAME 1
  246. #define CURSOR_CID_NUMBER_BASENAME 2
  247. #define CURSOR_CID_NUMBER_BINARYCOMPARABLE 3
  248. #define CURSOR_CID_NUMBER_BINDTYPE 4
  249. #define CURSOR_CID_NUMBER_CASESENSITIVE 5
  250. #define CURSOR_CID_NUMBER_COLLATINGORDER 6
  251. #define CURSOR_CID_NUMBER_COLUMNID 7
  252. #define CURSOR_CID_NUMBER_CURSORCOLUMN 8
  253. #define CURSOR_CID_NUMBER_DATACOLUMN 9
  254. #define CURSOR_CID_NUMBER_DEFAULTVALUE 10
  255. #define CURSOR_CID_NUMBER_ENTRYIDMAXLENGTH 11
  256. #define CURSOR_CID_NUMBER_FIXED 12
  257. #define CURSOR_CID_NUMBER_HASDEFAULT 13
  258. #define CURSOR_CID_NUMBER_MAXLENGTH 14
  259. #define CURSOR_CID_NUMBER_MULTIVALUED 15
  260. #define CURSOR_CID_NUMBER_NAME 16
  261. #define CURSOR_CID_NUMBER_NULLABLE 17
  262. #define CURSOR_CID_NUMBER_PHYSICALSORT 18
  263. #define CURSOR_CID_NUMBER_NUMBER 19
  264. #define CURSOR_CID_NUMBER_ROWENTRYID 20
  265. #define CURSOR_CID_NUMBER_SCALE 21
  266. #define CURSOR_CID_NUMBER_SEARCHABLE 22
  267. #define CURSOR_CID_NUMBER_TYPE 23
  268. #define CURSOR_CID_NUMBER_UNIQUE 24
  269. #define CURSOR_CID_NUMBER_UPDATABLE 25
  270. #define CURSOR_CID_NUMBER_VERSION 26
  271. #define CURSOR_CID_NUMBER_STATUS 27
  272. /* c and C++ have different meanings for const.
  273. */
  274. #ifdef __cplusplus
  275. #define EXTERNAL_DEFN extern const
  276. #else
  277. #define EXTERNAL_DEFN const
  278. #endif /* __cplusplus */
  279. #define CURSOR_DBCIDGUID {0xfe284700L,0xd188,0x11cd,{0xad,0x48, 0x0,0xaa, 0x0,0x3c,0x9c,0xb6}}
  280. #ifdef CURSOR_DBINITCONSTANTS
  281. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMNID_INVALID = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, -1};
  282. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_AUTOINCREMENT = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 0};
  283. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BASECOLUMNNAME = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 1};
  284. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BASENAME = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 2};
  285. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BINARYCOMPARABLE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 3};
  286. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BINDTYPE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 4};
  287. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_CASESENSITIVE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 5};
  288. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_COLLATINGORDER = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 6};
  289. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_COLUMNID = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 7};
  290. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_CURSORCOLUMN = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 8};
  291. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_DATACOLUMN = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 9};
  292. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_DEFAULTVALUE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 10};
  293. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_ENTRYIDMAXLENGTH = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 11};
  294. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_FIXED = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 12};
  295. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_HASDEFAULT = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 13};
  296. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_MAXLENGTH = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 14};
  297. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_MULTIVALUED = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 15};
  298. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_NAME = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 16};
  299. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_NULLABLE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 17};
  300. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_PHYSICALSORT = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 18};
  301. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_NUMBER = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 19};
  302. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_ROWENTRYID = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 20};
  303. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_SCALE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 21};
  304. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_SEARCHABLE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 22};
  305. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_TYPE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 23};
  306. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_UNIQUE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 24};
  307. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_UPDATABLE = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 25};
  308. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_VERSION = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 26};
  309. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_STATUS = {CURSOR_DBCIDGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 27};
  310. #else
  311. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMNID_INVALID;
  312. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_AUTOINCREMENT;
  313. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BASECOLUMNNAME;
  314. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BASENAME;
  315. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BINARYCOMPARABLE;
  316. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BINDTYPE;
  317. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_CASESENSITIVE;
  318. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_COLLATINGORDER;
  319. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_COLUMNID;
  320. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_CURSORCOLUMN;
  321. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_DATACOLUMN;
  322. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_DEFAULTVALUE;
  323. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_ENTRYIDMAXLENGTH;
  324. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_FIXED;
  325. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_HASDEFAULT;
  326. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_MAXLENGTH;
  327. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_MULTIVALUED;
  328. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_NAME;
  329. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_NULLABLE;
  330. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_PHYSICALSORT;
  331. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_NUMBER;
  332. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_ROWENTRYID;
  333. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_SCALE;
  334. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_SEARCHABLE;
  335. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_TYPE;
  336. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_UNIQUE;
  337. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_UPDATABLE;
  338. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_VERSION;
  339. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_STATUS;
  340. #endif
  341. #define CURSOR_BMK_NUMBER_BMKTEMPORARY 0
  342. #define CURSOR_BMK_NUMBER_BMKTEMPORARYREL 1
  343. #define CURSOR_BMK_NUMBER_BMKCURSOR 2
  344. #define CURSOR_BMK_NUMBER_BMKCURSORREL 3
  345. #define CURSOR_BMK_NUMBER_BMKSESSION 4
  346. #define CURSOR_BMK_NUMBER_BMKSESSIONREL 5
  347. #define CURSOR_BMK_NUMBER_BMKPERSIST 6
  348. #define CURSOR_BMK_NUMBER_BMKPERSISTREL 7
  349. #define CURSOR_DBBMKGUID {0xf6304bb0L,0xd188,0x11cd,{0xad,0x48, 0x0,0xaa, 0x0,0x3c,0x9c,0xb6}}
  350. #ifdef CURSOR_DBINITCONSTANTS
  351. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKTEMPORARY = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 0};
  352. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKTEMPORARYREL = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 1};
  353. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKCURSOR = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 2};
  354. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKCURSORREL = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 3};
  355. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKSESSION = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 4};
  356. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKSESSIONREL = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 5};
  357. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKPERSIST = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 6};
  358. EXTERNAL_DEFN CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKPERSISTREL = {CURSOR_DBBMKGUID, CURSOR_DBCOLKIND_GUID_NUMBER, 7};
  359. #else
  360. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKINVALID;
  361. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKTEMPORARY;
  362. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKTEMPORARYREL;
  363. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKCURSOR;
  364. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKCURSORREL;
  365. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKSESSION;
  366. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKSESSIONREL;
  367. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKPERSIST;
  368. extern const CURSOR_DBCOLUMNID NEAR CURSOR_COLUMN_BMKPERSISTREL;
  369. #endif
  370. #define CURSOR_DB_BMK_SIZE sizeof(BYTE)
  371. #ifdef CURSOR_DBINITCONSTANTS
  372. EXTERNAL_DEFN BYTE NEAR CURSOR_DBBMK_INVALID = 0x0;
  373. EXTERNAL_DEFN BYTE NEAR CURSOR_DBBMK_CURRENT = 0x1;
  374. EXTERNAL_DEFN BYTE NEAR CURSOR_DBBMK_BEGINNING = 0x2;
  375. EXTERNAL_DEFN BYTE NEAR CURSOR_DBBMK_END = 0x3;
  376. #else
  377. extern const BYTE NEAR CURSOR_DBBMK_INVALID;
  378. extern const BYTE NEAR CURSOR_DBBMK_CURRENT;
  379. extern const BYTE NEAR CURSOR_DBBMK_BEGINNING;
  380. extern const BYTE NEAR CURSOR_DBBMK_END;
  381. #endif
  382. typedef enum tagCURSOR_DBCOLUMNBINDOPTS
  383. {
  384. CURSOR_DBCOLUMNBINDOPTS_REPLACE = 0,
  385. CURSOR_DBCOLUMNBINDOPTS_ADD = 1
  386. }
  387. CURSOR_DBCOLUMNBINDOPTS;
  388. typedef enum tagCURSOR_DBUPDATELOCK
  389. {
  390. CURSOR_DBUPDATELOCK_PESSIMISTIC = 0,
  391. CURSOR_DBUPDATELOCK_OPTIMISTIC = 1
  392. }
  393. CURSOR_DBUPDATELOCK;
  394. typedef enum tagCURSOR_DBCOLUMNDATA
  395. {
  396. CURSOR_DBCOLUMNDATA_UNCHANGED = 0,
  397. CURSOR_DBCOLUMNDATA_CHANGED = 1,
  398. CURSOR_DBCOLUMNDATA_UNKNOWN = 2
  399. }
  400. CURSOR_DBCOLUMNDATA;
  401. typedef enum tagCURSOR_DBROWACTION
  402. {
  403. CURSOR_DBROWACTION_IGNORE = 0,
  404. CURSOR_DBROWACTION_UPDATE = 1,
  405. CURSOR_DBROWACTION_DELETE = 2,
  406. CURSOR_DBROWACTION_ADD = 3,
  407. CURSOR_DBROWACTION_LOCK = 4,
  408. CURSOR_DBROWACTION_UNLOCK = 5
  409. }
  410. CURSOR_DBROWACTION;
  411. typedef enum tagCURSOR_DBUPDATEABLE
  412. {
  413. CURSOR_DBUPDATEABLE_UPDATEABLE = 0,
  414. CURSOR_DBUPDATEABLE_NOTUPDATEABLE = 1,
  415. CURSOR_DBUPDATEABLE_UNKNOWN = 2
  416. }
  417. CURSOR_DBUPDATEABLE;
  418. typedef struct tagCURSOR_DBROWSTATUS
  419. {
  420. HRESULT hrStatus;
  421. CURSOR_BLOB Bookmark;
  422. }
  423. CURSOR_DBROWSTATUS;
  424. typedef enum tagCURSOR_DBEVENTWHATS
  425. {
  426. CURSOR_DBEVENT_CURRENT_ROW_CHANGED = 1,
  427. CURSOR_DBEVENT_CURRENT_ROW_DATA_CHANGED = 2,
  428. CURSOR_DBEVENT_NONCURRENT_ROW_DATA_CHANGED = 4,
  429. CURSOR_DBEVENT_SET_OF_COLUMNS_CHANGED = 8,
  430. CURSOR_DBEVENT_ORDER_OF_COLUMNS_CHANGED = 16,
  431. CURSOR_DBEVENT_SET_OF_ROWS_CHANGED = 32,
  432. CURSOR_DBEVENT_ORDER_OF_ROWS_CHANGED = 64,
  433. CURSOR_DBEVENT_METADATA_CHANGED = 128,
  434. CURSOR_DBEVENT_ASYNCH_OP_FINISHED = 256,
  435. CURSOR_DBEVENT_FIND_CRITERIA_CHANGED = 512,
  436. }
  437. CURSOR_DBEVENTWHATS;
  438. typedef enum tagCURSOR_DBREASON
  439. {
  440. CURSOR_DBREASON_DELETED = 1,
  441. CURSOR_DBREASON_INSERTED = 2,
  442. CURSOR_DBREASON_MODIFIED = 3,
  443. CURSOR_DBREASON_REMOVEDFROMCURSOR = 4,
  444. CURSOR_DBREASON_MOVEDINCURSOR = 5,
  445. CURSOR_DBREASON_MOVE = 6,
  446. CURSOR_DBREASON_FIND = 7,
  447. CURSOR_DBREASON_NEWINDEX = 8,
  448. CURSOR_DBREASON_ROWFIXUP = 9,
  449. CURSOR_DBREASON_RECALC = 10,
  450. CURSOR_DBREASON_REFRESH = 11,
  451. CURSOR_DBREASON_NEWPARAMETERS = 12,
  452. CURSOR_DBREASON_SORTCHANGED = 13,
  453. CURSOR_DBREASON_FILTERCHANGED = 14,
  454. CURSOR_DBREASON_QUERYSPECCHANGED = 15,
  455. CURSOR_DBREASON_SEEK = 16,
  456. CURSOR_DBREASON_PERCENT = 17,
  457. CURSOR_DBREASON_FINDCRITERIACHANGED = 18,
  458. CURSOR_DBREASON_SETRANGECHANGED = 19,
  459. CURSOR_DBREASON_ADDNEW = 20,
  460. CURSOR_DBREASON_MOVEPERCENT = 21,
  461. CURSOR_DBREASON_BEGINTRANSACT = 22,
  462. CURSOR_DBREASON_ROLLBACK = 23,
  463. CURSOR_DBREASON_COMMIT = 24,
  464. CURSOR_DBREASON_CLOSE = 25,
  465. CURSOR_DBREASON_BULK_ERROR = 26,
  466. CURSOR_DBREASON_BULK_NOTTRANSACTABLE = 27,
  467. CURSOR_DBREASON_BULK_ABOUTTOEXECUTE = 28,
  468. CURSOR_DBREASON_CANCELUPDATE = 29,
  469. CURSOR_DBREASON_SETCOLUMN = 30,
  470. CURSOR_DBREASON_EDIT = 31
  471. }
  472. CURSOR_DBREASON;
  473. // Arg1 values for CURSOR_DBREASON_FIND
  474. typedef enum tagCURSOR_DBFINDTYPES
  475. {
  476. CURSOR_DB_FINDFIRST = 1,
  477. CURSOR_DB_FINDLAST = 2,
  478. CURSOR_DB_FINDNEXT = 3,
  479. CURSOR_DB_FINDPRIOR = 4,
  480. CURSOR_DB_FIND = 5
  481. }
  482. CURSOR_DBFINDTYPES;
  483. typedef struct tagCURSOR_DBNOTIFYREASON
  484. {
  485. DWORD dwReason;
  486. CURSOR_DBVARIANT arg1;
  487. CURSOR_DBVARIANT arg2;
  488. }
  489. CURSOR_DBNOTIFYREASON;
  490. #define CURSOR_DB_E_BADBINDINFO MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e00)
  491. #define CURSOR_DB_E_BADBOOKMARK MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e01)
  492. #define CURSOR_DB_E_BADCOLUMNID MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e02)
  493. #define CURSOR_DB_E_BADCRITERIA MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e03)
  494. #define CURSOR_DB_E_BADENTRYID MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e04)
  495. #define CURSOR_DB_E_BADFRACTION MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e05)
  496. #define CURSOR_DB_E_BADINDEXID MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e06)
  497. #define CURSOR_DB_E_BADQUERYSPEC MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e07)
  498. #define CURSOR_DB_E_BADSORTORDER MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e08)
  499. #define CURSOR_DB_E_BADVALUES MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e09)
  500. #define CURSOR_DB_E_CANTCOERCE MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e0a)
  501. #define CURSOR_DB_E_CANTLOCK MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e0b)
  502. #define CURSOR_DB_E_COLUMNUNAVAILABLE MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e0c)
  503. #define CURSOR_DB_E_DATACHANGED MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e0d)
  504. #define CURSOR_DB_E_INVALIDCOLUMNORDINAL MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e0e)
  505. #define CURSOR_DB_E_INVALIDINTERFACE MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e0f)
  506. #define CURSOR_DB_E_LOCKFAILED MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e10)
  507. #define CURSOR_DB_E_ROWDELETED MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e11)
  508. #define CURSOR_DB_E_ROWTOOSHORT MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e12)
  509. #define CURSOR_DB_E_SCHEMAVIOLATION MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e13)
  510. #define CURSOR_DB_E_SEEKKINDNOTSUPPORTED MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e14)
  511. #define CURSOR_DB_E_UPDATEINPROGRESS MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e15)
  512. #define CURSOR_DB_E_USEENTRYID MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e16)
  513. #define CURSOR_DB_E_STATEERROR MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e17)
  514. #define CURSOR_DB_E_BADFETCHINFO MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e18)
  515. #define CURSOR_DB_E_NOASYNC MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e19)
  516. #define CURSOR_DB_E_ENTRYIDOPEN MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e1a)
  517. #define CURSOR_DB_E_BUFFERTOOSMALL MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x0e1b)
  518. #define CURSOR_DB_S_BUFFERTOOSMALL MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec0)
  519. #define CURSOR_DB_S_CANCEL MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec1)
  520. #define CURSOR_DB_S_DATACHANGED MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec2)
  521. #define CURSOR_DB_S_ENDOFCURSOR MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec3)
  522. #define CURSOR_DB_S_ENDOFRESULTSET MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec4)
  523. #define CURSOR_DB_S_OPERATIONCANCELLED MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec5)
  524. #define CURSOR_DB_S_QUERYINTERFACE MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec6)
  525. #define CURSOR_DB_S_WORKINGASYNC MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec7)
  526. //#define CURSOR_DB_S_COULDNTCOERCE MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec8)
  527. #define CURSOR_DB_S_MOVEDTOFIRST MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ec9)
  528. #define CURSOR_DB_S_CURRENTROWUNCHANGED MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0eca)
  529. #define CURSOR_DB_S_ROWADDED MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ecb)
  530. #define CURSOR_DB_S_ROWUPDATED MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ecc)
  531. #define CURSOR_DB_S_ROWDELETED MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 0x0ecd)
  532. /*----------------------------------------------------------------------------
  533. *
  534. * ICursor
  535. *
  536. *----------------------------------------------------------------------------
  537. */
  538. /* Forward declaration */
  539. //typedef interface ICursor ICursor;
  540. #if defined(__cplusplus) && !defined(CINTERFACE)
  541. /* C++ Language Binding */
  542. //extern "C" const IID IID_ICursor;
  543. interface ICursor : public IUnknown
  544. {
  545. public:
  546. virtual HRESULT STDMETHODCALLTYPE GetColumnsCursor
  547. (
  548. REFIID riid,
  549. IUnknown **ppvColumnsCursor,
  550. ULONG *pcRows
  551. ) = 0;
  552. virtual HRESULT STDMETHODCALLTYPE SetBindings
  553. (
  554. ULONG cCol,
  555. CURSOR_DBCOLUMNBINDING rgBoundColumns[],
  556. ULONG cbRowLength,
  557. DWORD dwFlags
  558. ) = 0;
  559. virtual HRESULT STDMETHODCALLTYPE GetBindings
  560. (
  561. ULONG *pcCol,
  562. CURSOR_DBCOLUMNBINDING *prgBoundColumns[],
  563. ULONG *pcbRowLength
  564. ) = 0;
  565. virtual HRESULT STDMETHODCALLTYPE GetNextRows
  566. (
  567. LARGE_INTEGER udlRowsToSkip,
  568. CURSOR_DBFETCHROWS *pFetchParams
  569. ) = 0;
  570. virtual HRESULT STDMETHODCALLTYPE Requery
  571. (
  572. void
  573. ) = 0;
  574. };
  575. #else
  576. /* C Language Binding */
  577. //extern const IID IID_ICursor;
  578. typedef struct ICursorVtbl
  579. {
  580. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  581. (
  582. ICursor FAR *this,
  583. REFIID riid,
  584. void **ppvObject
  585. );
  586. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  587. (
  588. ICursor FAR *this
  589. );
  590. ULONG (STDMETHODCALLTYPE FAR *Release)
  591. (
  592. ICursor FAR *this
  593. );
  594. HRESULT (STDMETHODCALLTYPE FAR *GetColumnsCursor)
  595. (
  596. ICursor FAR *this,
  597. REFIID riid,
  598. IUnknown **ppvColumnsCursor,
  599. ULONG *pcRows
  600. );
  601. HRESULT (STDMETHODCALLTYPE FAR *SetBindings)
  602. (
  603. ICursor FAR *this,
  604. ULONG cCol,
  605. CURSOR_DBCOLUMNBINDING rgBoundColumns[],
  606. ULONG cbRowLength,
  607. DWORD dwFlags
  608. );
  609. HRESULT (STDMETHODCALLTYPE FAR *GetBindings)
  610. (
  611. ICursor FAR *this,
  612. ULONG *pcCol,
  613. CURSOR_DBCOLUMNBINDING *prgBoundColumns[],
  614. ULONG *pcbRowLength
  615. );
  616. HRESULT (STDMETHODCALLTYPE FAR *GetNextRows)
  617. (
  618. ICursor FAR *this,
  619. LARGE_INTEGER udlRowsToSkip,
  620. CURSOR_DBFETCHROWS *pFetchParams
  621. );
  622. HRESULT (STDMETHODCALLTYPE FAR *Requery)
  623. (
  624. ICursor FAR *this
  625. );
  626. } ICursorVtbl;
  627. interface ICursor
  628. {
  629. ICursorVtbl FAR *lpVtbl;
  630. } ;
  631. #ifdef COBJMACROS
  632. #define ICursor_QueryInterface(pI, riid, ppvObject) \
  633. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  634. #define ICursor_AddRef(pI) \
  635. (*(pI)->lpVtbl->AddRef)((pI))
  636. #define ICursor_Release(pI) \
  637. (*(pI)->lpVtbl->Release)((pI))
  638. #define ICursor_GetColumnsCursor(pI, riid, ppvColumnsCursor, pcRows) \
  639. (*(pI)->lpVtbl->GetColumnsCursor)((pI), riid, ppvColumnsCursor, pcRows)
  640. #define ICursor_SetBindings(pI, cCol, rgBoundColumns, cbRowLength, dwFlags) \
  641. (*(pI)->lpVtbl->SetBindings)((pI), cCol, rgBoundColumns, cbRowLength, dwFlags)
  642. #define ICursor_GetBindings(pI, pcCol, prgBoundColumns, pcbRowLength) \
  643. (*(pI)->lpVtbl->GetBindings)((pI), pcCol, prgBoundColumns, pcbRowLength)
  644. #define ICursor_GetNextRows(pI, udlRowsToSkip, pFetchParams) \
  645. (*(pI)->lpVtbl->GetNextRows)((pI), udlRowsToSkip, pFetchParams)
  646. #define ICursor_Requery(pI) \
  647. (*(pI)->lpVtbl->Requery)((pI))
  648. #endif /* COBJMACROS */
  649. #endif
  650. /*----------------------------------------------------------------------------
  651. *
  652. * ICursorMove
  653. *
  654. *----------------------------------------------------------------------------
  655. */
  656. /* Forward declaration */
  657. //typedef interface ICursorMove ICursorMove;
  658. typedef enum tagCURSOR_DBCLONEOPTS
  659. {
  660. CURSOR_DBCLONEOPTS_DEFAULT = 0,
  661. CURSOR_DBCLONEOPTS_SAMEROW = 1
  662. }
  663. CURSOR_DBCLONEOPTS;
  664. #if defined(__cplusplus) && !defined(CINTERFACE)
  665. /* C++ Language Binding */
  666. //extern "C" const IID IID_ICursorMove;
  667. interface ICursorMove : public ICursor
  668. {
  669. public:
  670. virtual HRESULT STDMETHODCALLTYPE Move
  671. (
  672. ULONG cbBookmark,
  673. void *pBookmark,
  674. LARGE_INTEGER dlOffset,
  675. CURSOR_DBFETCHROWS *pFetchParams
  676. ) = 0;
  677. virtual HRESULT STDMETHODCALLTYPE GetBookmark
  678. (
  679. CURSOR_DBCOLUMNID *pBookmarkType,
  680. ULONG cbMaxSize,
  681. ULONG *pcbBookmark,
  682. void *pBookmark
  683. ) = 0;
  684. virtual HRESULT STDMETHODCALLTYPE Clone
  685. (
  686. DWORD dwFlags,
  687. REFIID riid,
  688. IUnknown **ppvClonedCursor
  689. ) = 0;
  690. };
  691. #else
  692. /* C Language Binding */
  693. //extern const IID IID_ICursorMove;
  694. typedef struct ICursorMoveVtbl
  695. {
  696. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  697. (
  698. ICursorMove FAR *this,
  699. REFIID riid,
  700. void **ppvObject
  701. );
  702. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  703. (
  704. ICursorMove FAR *this
  705. );
  706. ULONG (STDMETHODCALLTYPE FAR *Release)
  707. (
  708. ICursorMove FAR *this
  709. );
  710. HRESULT (STDMETHODCALLTYPE FAR *GetColumnsCursor)
  711. (
  712. ICursorMove FAR *this,
  713. REFIID riid,
  714. IUnknown **ppvColumnsCursor,
  715. ULONG *pcRows
  716. );
  717. HRESULT (STDMETHODCALLTYPE FAR *SetBindings)
  718. (
  719. ICursorMove FAR *this,
  720. ULONG cCol,
  721. CURSOR_DBCOLUMNBINDING rgBoundColumns[],
  722. ULONG cbRowLength,
  723. DWORD dwFlags
  724. );
  725. HRESULT (STDMETHODCALLTYPE FAR *GetBindings)
  726. (
  727. ICursorMove FAR *this,
  728. ULONG *pcCol,
  729. CURSOR_DBCOLUMNBINDING *prgBoundColumns[],
  730. ULONG *pcbRowLength
  731. );
  732. HRESULT (STDMETHODCALLTYPE FAR *GetNextRows)
  733. (
  734. ICursorMove FAR *this,
  735. LARGE_INTEGER udlRowsToSkip,
  736. CURSOR_DBFETCHROWS *pFetchParams
  737. );
  738. HRESULT (STDMETHODCALLTYPE FAR *Requery)
  739. (
  740. ICursorMove FAR *this
  741. );
  742. HRESULT (STDMETHODCALLTYPE FAR *Move)
  743. (
  744. ICursorMove FAR *this,
  745. ULONG cbBookmark,
  746. void *pBookmark,
  747. LARGE_INTEGER dlOffset,
  748. CURSOR_DBFETCHROWS *pFetchParams
  749. );
  750. HRESULT (STDMETHODCALLTYPE FAR *GetBookmark)
  751. (
  752. ICursorMove FAR *this,
  753. CURSOR_DBCOLUMNID *pBookmarkType,
  754. ULONG cbMaxSize,
  755. ULONG *pcbBookmark,
  756. void *pBookmark
  757. );
  758. HRESULT (STDMETHODCALLTYPE FAR *Clone)
  759. (
  760. ICursorMove FAR *this,
  761. DWORD dwFlags,
  762. REFIID riid,
  763. IUnknown **ppvClonedCursor
  764. );
  765. } ICursorMoveVtbl;
  766. interface ICursorMove
  767. {
  768. ICursorMoveVtbl FAR *lpVtbl;
  769. } ;
  770. #ifdef COBJMACROS
  771. #define ICursorMove_QueryInterface(pI, riid, ppvObject) \
  772. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  773. #define ICursorMove_AddRef(pI) \
  774. (*(pI)->lpVtbl->AddRef)((pI))
  775. #define ICursorMove_Release(pI) \
  776. (*(pI)->lpVtbl->Release)((pI))
  777. #define ICursorMove_GetColumnsCursor(pI, riid, ppvColumnsCursor, pcRows) \
  778. (*(pI)->lpVtbl->GetColumnsCursor)((pI), riid, ppvColumnsCursor, pcRows)
  779. #define ICursorMove_SetBindings(pI, cCol, rgBoundColumns, cbRowLength, dwFlags) \
  780. (*(pI)->lpVtbl->SetBindings)((pI), cCol, rgBoundColumns, cbRowLength, dwFlags)
  781. #define ICursorMove_GetBindings(pI, pcCol, prgBoundColumns, pcbRowLength) \
  782. (*(pI)->lpVtbl->GetBindings)((pI), pcCol, prgBoundColumns, pcbRowLength)
  783. #define ICursorMove_GetNextRows(pI, udlRowsToSkip, pFetchParams) \
  784. (*(pI)->lpVtbl->GetNextRows)((pI), udlRowsToSkip, pFetchParams)
  785. #define ICursorMove_Requery(pI) \
  786. (*(pI)->lpVtbl->Requery)((pI))
  787. #define ICursorMove_Move(pI, cbBookmark, pBookmark, dlOffset, pFetchParams) \
  788. (*(pI)->lpVtbl->Move)((pI), cbBookmark, pBookmark, dlOffset, pFetchParams)
  789. #define ICursorMove_GetBookmark(pI, pBookmarkType, cbMaxSize, pcbBookmark, pBookmark) \
  790. (*(pI)->lpVtbl->GetBookmark)((pI), pBookmarkType, cbMaxSize, pcbBookmark, pBookmark)
  791. #define ICursorMove_Clone(pI, dwFlags, riid, ppvClonedCursor) \
  792. (*(pI)->lpVtbl->Clone)((pI), dwFlags, riid, ppvClonedCursor)
  793. #endif /* COBJMACROS */
  794. #endif
  795. /*----------------------------------------------------------------------------
  796. *
  797. * ICursorScroll
  798. *
  799. *----------------------------------------------------------------------------
  800. */
  801. /* Forward declaration */
  802. //typedef interface ICursorScroll ICursorScroll;
  803. typedef enum tagCURSOR_DBCURSORPOPULATED
  804. {
  805. CURSOR_DBCURSORPOPULATED_FULLY = 0,
  806. CURSOR_DBCURSORPOPULATED_PARTIALLY = 1
  807. }
  808. CURSOR_DBCURSORPOPULATED;
  809. #if defined(__cplusplus) && !defined(CINTERFACE)
  810. /* C++ Language Binding */
  811. //extern "C" const IID IID_ICursorScroll;
  812. interface ICursorScroll : public ICursorMove
  813. {
  814. public:
  815. virtual HRESULT STDMETHODCALLTYPE Scroll
  816. (
  817. ULONG ulNumerator,
  818. ULONG ulDenominator,
  819. CURSOR_DBFETCHROWS *pFetchParams
  820. ) = 0;
  821. virtual HRESULT STDMETHODCALLTYPE GetApproximatePosition
  822. (
  823. ULONG cbBookmark,
  824. void *pBookmark,
  825. ULONG *pulNumerator,
  826. ULONG *pulDenominator
  827. ) = 0;
  828. virtual HRESULT STDMETHODCALLTYPE GetApproximateCount
  829. (
  830. LARGE_INTEGER *pudlApproxCount,
  831. DWORD *pdwFullyPopulated
  832. ) = 0;
  833. };
  834. #else
  835. /* C Language Binding */
  836. //extern const IID IID_ICursorScroll;
  837. typedef struct ICursorScrollVtbl
  838. {
  839. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  840. (
  841. ICursorScroll FAR *this,
  842. REFIID riid,
  843. void **ppvObject
  844. );
  845. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  846. (
  847. ICursorScroll FAR *this
  848. );
  849. ULONG (STDMETHODCALLTYPE FAR *Release)
  850. (
  851. ICursorScroll FAR *this
  852. );
  853. HRESULT (STDMETHODCALLTYPE FAR *GetColumnsCursor)
  854. (
  855. ICursorScroll FAR *this,
  856. REFIID riid,
  857. IUnknown **ppvColumnsCursor,
  858. ULONG *pcRows
  859. );
  860. HRESULT (STDMETHODCALLTYPE FAR *SetBindings)
  861. (
  862. ICursorScroll FAR *this,
  863. ULONG cCol,
  864. CURSOR_DBCOLUMNBINDING rgBoundColumns[],
  865. ULONG cbRowLength,
  866. DWORD dwFlags
  867. );
  868. HRESULT (STDMETHODCALLTYPE FAR *GetBindings)
  869. (
  870. ICursorScroll FAR *this,
  871. ULONG *pcCol,
  872. CURSOR_DBCOLUMNBINDING *prgBoundColumns[],
  873. ULONG *pcbRowLength
  874. );
  875. HRESULT (STDMETHODCALLTYPE FAR *GetNextRows)
  876. (
  877. ICursorScroll FAR *this,
  878. LARGE_INTEGER udlRowsToSkip,
  879. CURSOR_DBFETCHROWS *pFetchParams
  880. );
  881. HRESULT (STDMETHODCALLTYPE FAR *Requery)
  882. (
  883. ICursorScroll FAR *this
  884. );
  885. HRESULT (STDMETHODCALLTYPE FAR *Move)
  886. (
  887. ICursorScroll FAR *this,
  888. ULONG cbBookmark,
  889. void *pBookmark,
  890. LARGE_INTEGER dlOffset,
  891. CURSOR_DBFETCHROWS *pFetchParams
  892. );
  893. HRESULT (STDMETHODCALLTYPE FAR *GetBookmark)
  894. (
  895. ICursorScroll FAR *this,
  896. CURSOR_DBCOLUMNID *pBookmarkType,
  897. ULONG cbMaxSize,
  898. ULONG *pcbBookmark,
  899. void *pBookmark
  900. );
  901. HRESULT (STDMETHODCALLTYPE FAR *Clone)
  902. (
  903. ICursorScroll FAR *this,
  904. DWORD dwFlags,
  905. REFIID riid,
  906. IUnknown **ppvClonedCursor
  907. );
  908. HRESULT (STDMETHODCALLTYPE FAR *Scroll)
  909. (
  910. ICursorScroll FAR *this,
  911. ULONG ulNumerator,
  912. ULONG ulDenominator,
  913. CURSOR_DBFETCHROWS *pFetchParams
  914. );
  915. HRESULT (STDMETHODCALLTYPE FAR *GetApproximatePosition)
  916. (
  917. ICursorScroll FAR *this,
  918. ULONG cbBookmark,
  919. void *pBookmark,
  920. ULONG *pulNumerator,
  921. ULONG *pulDenominator
  922. );
  923. HRESULT (STDMETHODCALLTYPE FAR *GetApproximateCount)
  924. (
  925. ICursorScroll FAR *this,
  926. LARGE_INTEGER *pudlApproxCount,
  927. DWORD *pdwFullyPopulated
  928. );
  929. } ICursorScrollVtbl;
  930. interface ICursorScroll
  931. {
  932. ICursorScrollVtbl FAR *lpVtbl;
  933. } ;
  934. #ifdef COBJMACROS
  935. #define ICursorScroll_QueryInterface(pI, riid, ppvObject) \
  936. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  937. #define ICursorScroll_AddRef(pI) \
  938. (*(pI)->lpVtbl->AddRef)((pI))
  939. #define ICursorScroll_Release(pI) \
  940. (*(pI)->lpVtbl->Release)((pI))
  941. #define ICursorScroll_GetColumnsCursor(pI, riid, ppvColumnsCursor, pcRows) \
  942. (*(pI)->lpVtbl->GetColumnsCursor)((pI), riid, ppvColumnsCursor, pcRows)
  943. #define ICursorScroll_SetBindings(pI, cCol, rgBoundColumns, cbRowLength, dwFlags) \
  944. (*(pI)->lpVtbl->SetBindings)((pI), cCol, rgBoundColumns, cbRowLength, dwFlags)
  945. #define ICursorScroll_GetBindings(pI, pcCol, prgBoundColumns, pcbRowLength) \
  946. (*(pI)->lpVtbl->GetBindings)((pI), pcCol, prgBoundColumns, pcbRowLength)
  947. #define ICursorScroll_GetNextRows(pI, udlRowsToSkip, pFetchParams) \
  948. (*(pI)->lpVtbl->GetNextRows)((pI), udlRowsToSkip, pFetchParams)
  949. #define ICursorScroll_Requery(pI) \
  950. (*(pI)->lpVtbl->Requery)((pI))
  951. #define ICursorScroll_Move(pI, cbBookmark, pBookmark, dlOffset, pFetchParams) \
  952. (*(pI)->lpVtbl->Move)((pI), cbBookmark, pBookmark, dlOffset, pFetchParams)
  953. #define ICursorScroll_GetBookmark(pI, pBookmarkType, cbMaxSize, pcbBookmark, pBookmark) \
  954. (*(pI)->lpVtbl->GetBookmark)((pI), pBookmarkType, cbMaxSize, pcbBookmark, pBookmark)
  955. #define ICursorScroll_Clone(pI, dwFlags, riid, ppvClonedCursor) \
  956. (*(pI)->lpVtbl->Clone)((pI), dwFlags, riid, ppvClonedCursor)
  957. #define ICursorScroll_Scroll(pI, ulNumerator, ulDenominator, pFetchParams) \
  958. (*(pI)->lpVtbl->Scroll)((pI), ulNumerator, ulDenominator, pFetchParams)
  959. #define ICursorScroll_GetApproximatePosition(pI, cbBookmark, pBookmark, pulNumerator, pulDenominator) \
  960. (*(pI)->lpVtbl->GetApproximatePosition)((pI), cbBookmark, pBookmark, pulNumerator, pulDenominator)
  961. #define ICursorScroll_GetApproximateCount(pI, pudlApproxCount, pdwFullyPopulated) \
  962. (*(pI)->lpVtbl->GetApproximateCount)((pI), pudlApproxCount, pdwFullyPopulated)
  963. #endif /* COBJMACROS */
  964. #endif
  965. /*----------------------------------------------------------------------------
  966. *
  967. * ICursorUpdateARow
  968. *
  969. *----------------------------------------------------------------------------
  970. */
  971. /* Forward declaration */
  972. //typedef interface ICursorUpdateARow ICursorUpdateARow;
  973. typedef enum tagCURSOR_DBEDITMODE
  974. {
  975. CURSOR_DBEDITMODE_NONE = 1,
  976. CURSOR_DBEDITMODE_UPDATE = 2,
  977. CURSOR_DBEDITMODE_ADD = 3
  978. }
  979. CURSOR_DBEDITMODE;
  980. #if defined(__cplusplus) && !defined(CINTERFACE)
  981. /* C++ Language Binding */
  982. //extern "C" const IID IID_ICursorUpdateARow;
  983. interface ICursorUpdateARow : public IUnknown
  984. {
  985. public:
  986. virtual HRESULT STDMETHODCALLTYPE BeginUpdate
  987. (
  988. DWORD dwFlags
  989. ) = 0;
  990. virtual HRESULT STDMETHODCALLTYPE SetColumn
  991. (
  992. CURSOR_DBCOLUMNID *pcid,
  993. CURSOR_DBBINDPARAMS *pBindParams
  994. ) = 0;
  995. virtual HRESULT STDMETHODCALLTYPE GetColumn
  996. (
  997. CURSOR_DBCOLUMNID *pcid,
  998. CURSOR_DBBINDPARAMS *pBindParams,
  999. DWORD *pdwFlags
  1000. ) = 0;
  1001. virtual HRESULT STDMETHODCALLTYPE GetEditMode
  1002. (
  1003. DWORD *pdwState
  1004. ) = 0;
  1005. virtual HRESULT STDMETHODCALLTYPE Update
  1006. (
  1007. CURSOR_DBCOLUMNID *pBookmarkType,
  1008. ULONG *pcbBookmark,
  1009. void **ppBookmark
  1010. ) = 0;
  1011. virtual HRESULT STDMETHODCALLTYPE Cancel
  1012. (
  1013. void
  1014. ) = 0;
  1015. virtual HRESULT STDMETHODCALLTYPE Delete
  1016. (
  1017. void
  1018. ) = 0;
  1019. };
  1020. #else
  1021. /* C Language Binding */
  1022. //extern const IID IID_ICursorUpdateARow;
  1023. typedef struct ICursorUpdateARowVtbl
  1024. {
  1025. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  1026. (
  1027. ICursorUpdateARow FAR *this,
  1028. REFIID riid,
  1029. void **ppvObject
  1030. );
  1031. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  1032. (
  1033. ICursorUpdateARow FAR *this
  1034. );
  1035. ULONG (STDMETHODCALLTYPE FAR *Release)
  1036. (
  1037. ICursorUpdateARow FAR *this
  1038. );
  1039. HRESULT (STDMETHODCALLTYPE FAR *BeginUpdate)
  1040. (
  1041. ICursorUpdateARow FAR *this,
  1042. DWORD dwFlags
  1043. );
  1044. HRESULT (STDMETHODCALLTYPE FAR *SetColumn)
  1045. (
  1046. ICursorUpdateARow FAR *this,
  1047. CURSOR_DBCOLUMNID *pcid,
  1048. CURSOR_DBBINDPARAMS *pBindParams
  1049. );
  1050. HRESULT (STDMETHODCALLTYPE FAR *GetColumn)
  1051. (
  1052. ICursorUpdateARow FAR *this,
  1053. CURSOR_DBCOLUMNID *pcid,
  1054. CURSOR_DBBINDPARAMS *pBindParams,
  1055. DWORD *pdwFlags
  1056. );
  1057. HRESULT (STDMETHODCALLTYPE FAR *GetEditMode)
  1058. (
  1059. ICursorUpdateARow FAR *this,
  1060. DWORD *pdwState
  1061. );
  1062. HRESULT (STDMETHODCALLTYPE FAR *Update)
  1063. (
  1064. ICursorUpdateARow FAR *this,
  1065. CURSOR_DBCOLUMNID *pBookmarkType,
  1066. ULONG *pcbBookmark,
  1067. void **ppBookmark
  1068. );
  1069. HRESULT (STDMETHODCALLTYPE FAR *Cancel)
  1070. (
  1071. ICursorUpdateARow FAR *this
  1072. );
  1073. HRESULT (STDMETHODCALLTYPE FAR *Delete)
  1074. (
  1075. ICursorUpdateARow FAR *this
  1076. );
  1077. } ICursorUpdateARowVtbl;
  1078. interface ICursorUpdateARow
  1079. {
  1080. ICursorUpdateARowVtbl FAR *lpVtbl;
  1081. } ;
  1082. #ifdef COBJMACROS
  1083. #define ICursorUpdateARow_QueryInterface(pI, riid, ppvObject) \
  1084. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  1085. #define ICursorUpdateARow_AddRef(pI) \
  1086. (*(pI)->lpVtbl->AddRef)((pI))
  1087. #define ICursorUpdateARow_Release(pI) \
  1088. (*(pI)->lpVtbl->Release)((pI))
  1089. #define ICursorUpdateARow_BeginUpdate(pI, dwFlags) \
  1090. (*(pI)->lpVtbl->BeginUpdate)((pI), dwFlags)
  1091. #define ICursorUpdateARow_SetColumn(pI, pcid, pBindParams) \
  1092. (*(pI)->lpVtbl->SetColumn)((pI), pcid, pBindParams)
  1093. #define ICursorUpdateARow_GetColumn(pI, pcid, pBindParams, pdwFlags) \
  1094. (*(pI)->lpVtbl->GetColumn)((pI), pcid, pBindParams, pdwFlags)
  1095. #define ICursorUpdateARow_GetEditMode(pI, pdwState) \
  1096. (*(pI)->lpVtbl->GetEditMode)((pI), pdwState)
  1097. #define ICursorUpdateARow_Update(pI, pBookmarkType, pcbBookmark, ppBookmark) \
  1098. (*(pI)->lpVtbl->Update)((pI), pBookmarkType, pcbBookmark, ppBookmark)
  1099. #define ICursorUpdateARow_Cancel(pI) \
  1100. (*(pI)->lpVtbl->Cancel)((pI))
  1101. #define ICursorUpdateARow_Delete(pI) \
  1102. (*(pI)->lpVtbl->Delete)((pI))
  1103. #endif /* COBJMACROS */
  1104. #endif
  1105. /*----------------------------------------------------------------------------
  1106. *
  1107. * ICursorFind
  1108. *
  1109. *----------------------------------------------------------------------------
  1110. */
  1111. /* Forward declaration */
  1112. //typedef interface ICursorFind ICursorFind;
  1113. typedef enum tagCURSOR_DBFINDFLAGS
  1114. {
  1115. CURSOR_DBFINDFLAGS_FINDNEXT = 1,
  1116. CURSOR_DBFINDFLAGS_FINDPRIOR = 2,
  1117. CURSOR_DBFINDFLAGS_INCLUDECURRENT = 4
  1118. }
  1119. CURSOR_DBFINDFLAGS;
  1120. typedef enum tagCURSOR_DBSEEKFLAGS
  1121. {
  1122. CURSOR_DBSEEK_LT = 1,
  1123. CURSOR_DBSEEK_LE = 2,
  1124. CURSOR_DBSEEK_EQ = 3, // EXACT EQUALITY
  1125. CURSOR_DBSEEK_GT = 4,
  1126. CURSOR_DBSEEK_GE = 5,
  1127. CURSOR_DBSEEK_PARTIALEQ = 6 // only for strings
  1128. }
  1129. CURSOR_DBSEEKFLAGS;
  1130. #if defined(__cplusplus) && !defined(CINTERFACE)
  1131. /* C++ Language Binding */
  1132. //extern "C" const IID IID_ICursorFind;
  1133. interface ICursorFind : public IUnknown
  1134. {
  1135. public:
  1136. virtual HRESULT STDMETHODCALLTYPE FindByValues
  1137. (
  1138. ULONG cbBookmark,
  1139. LPVOID pBookmark,
  1140. DWORD dwFindFlags,
  1141. ULONG cValues,
  1142. CURSOR_DBCOLUMNID rgColumns[],
  1143. CURSOR_DBVARIANT rgValues[],
  1144. DWORD rgdwSeekFlags[],
  1145. CURSOR_DBFETCHROWS FAR * pFetchParams
  1146. ) = 0;
  1147. };
  1148. #else
  1149. /* C Language Binding */
  1150. //extern const IID IID_ICursorFind;
  1151. typedef struct ICursorFindVtbl
  1152. {
  1153. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  1154. (
  1155. ICursorFind FAR *this,
  1156. REFIID riid,
  1157. void **ppvObject
  1158. );
  1159. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  1160. (
  1161. ICursorFind FAR *this
  1162. );
  1163. ULONG (STDMETHODCALLTYPE FAR *Release)
  1164. (
  1165. ICursorFind FAR *this
  1166. );
  1167. HRESULT (STDMETHODCALLTYPE FAR *FindByValues)
  1168. (
  1169. ICursorFind FAR *this,
  1170. ULONG cbBookmark,
  1171. LPVOID pBookmark,
  1172. DWORD dwFindFlags,
  1173. ULONG cValues,
  1174. CURSOR_DBCOLUMNID rgColumns[],
  1175. CURSOR_DBVARIANT rgValues[],
  1176. DWORD rgdwSeekFlags[],
  1177. CURSOR_DBFETCHROWS FAR * pFetchParams
  1178. );
  1179. } ICursorFindVtbl;
  1180. interface ICursorFind
  1181. {
  1182. ICursorFindVtbl FAR *lpVtbl;
  1183. } ;
  1184. #ifdef COBJMACROS
  1185. #define ICursorFind_QueryInterface(pI, riid, ppvObject) \
  1186. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  1187. #define ICursorFind_AddRef(pI) \
  1188. (*(pI)->lpVtbl->AddRef)((pI))
  1189. #define ICursorFind_Release(pI) \
  1190. (*(pI)->lpVtbl->Release)((pI))
  1191. #define ICursorFind_FindByValues(pI, cbB, pB, dwFF, cV, rgC, rgV, rgSF, pF) \
  1192. (*(pI)->lpVtbl->FindByValues)((pI), cbB, pB, dwFF, cB, rgC, rgV, rgSF, pF)
  1193. #endif /* COBJMACROS */
  1194. #endif
  1195. /*----------------------------------------------------------------------------
  1196. *
  1197. * IEntryID
  1198. *
  1199. *----------------------------------------------------------------------------
  1200. */
  1201. /* Forward declaration */
  1202. //typedef interface IEntryID IEntryID;
  1203. #if defined(__cplusplus) && !defined(CINTERFACE)
  1204. /* C++ Language Binding */
  1205. //extern "C" const IID IID_IEntryID;
  1206. interface IEntryID : public IUnknown
  1207. {
  1208. public:
  1209. virtual HRESULT STDMETHODCALLTYPE GetInterface
  1210. (
  1211. ULONG cbEntryID,
  1212. void *pEntryID,
  1213. DWORD dwFlags,
  1214. REFIID riid,
  1215. IUnknown **ppvObj
  1216. ) = 0;
  1217. };
  1218. #else
  1219. /* C Language Binding */
  1220. //extern const IID IID_IEntryID;
  1221. typedef struct IEntryIDVtbl
  1222. {
  1223. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  1224. (
  1225. IEntryID FAR *this,
  1226. REFIID riid,
  1227. void **ppvObject
  1228. );
  1229. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  1230. (
  1231. IEntryID FAR *this
  1232. );
  1233. ULONG (STDMETHODCALLTYPE FAR *Release)
  1234. (
  1235. IEntryID FAR *this
  1236. );
  1237. HRESULT (STDMETHODCALLTYPE FAR *GetInterface)
  1238. (
  1239. IEntryID FAR *this,
  1240. ULONG cbEntryID,
  1241. void *pEntryID,
  1242. REFIID riid,
  1243. IUnknown **ppvObj
  1244. );
  1245. } IEntryIDVtbl;
  1246. interface IEntryID
  1247. {
  1248. IEntryIDVtbl FAR *lpVtbl;
  1249. } ;
  1250. #ifdef COBJMACROS
  1251. #define IEntryID_QueryInterface(pI, riid, ppvObject) \
  1252. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  1253. #define IEntryID_AddRef(pI) \
  1254. (*(pI)->lpVtbl->AddRef)((pI))
  1255. #define IEntryID_Release(pI) \
  1256. (*(pI)->lpVtbl->Release)((pI))
  1257. #define IEntryID_GetInterface(pI, cbEntryID, pEntryID, riid, ppvObj) \
  1258. (*(pI)->lpVtbl->GetInterface)((pI), cbEntryID, pEntryID, riid, ppvObj)
  1259. #endif /* COBJMACROS */
  1260. #endif
  1261. /*----------------------------------------------------------------------------
  1262. *
  1263. * INotifyDBEvents
  1264. *
  1265. *----------------------------------------------------------------------------
  1266. */
  1267. /* Forward declaration */
  1268. //typedef interface INotifyDBEvents INotifyDBEvents;
  1269. #if defined(__cplusplus) && !defined(CINTERFACE)
  1270. /* C++ Language Binding */
  1271. //extern "C" const IID IID_INotifyDBEvents;
  1272. interface INotifyDBEvents : public IUnknown
  1273. {
  1274. public:
  1275. virtual HRESULT STDMETHODCALLTYPE OKToDo
  1276. (
  1277. DWORD dwEventWhat,
  1278. ULONG cReasons,
  1279. CURSOR_DBNOTIFYREASON rgReasons[]
  1280. ) = 0;
  1281. virtual HRESULT STDMETHODCALLTYPE Cancelled
  1282. (
  1283. DWORD dwEventWhat,
  1284. ULONG cReasons,
  1285. CURSOR_DBNOTIFYREASON rgReasons[]
  1286. ) = 0;
  1287. virtual HRESULT STDMETHODCALLTYPE SyncBefore
  1288. (
  1289. DWORD dwEventWhat,
  1290. ULONG cReasons,
  1291. CURSOR_DBNOTIFYREASON rgReasons[]
  1292. ) = 0;
  1293. virtual HRESULT STDMETHODCALLTYPE AboutToDo
  1294. (
  1295. DWORD dwEventWhat,
  1296. ULONG cReasons,
  1297. CURSOR_DBNOTIFYREASON rgReasons[]
  1298. ) = 0;
  1299. virtual HRESULT STDMETHODCALLTYPE FailedToDo
  1300. (
  1301. DWORD dwEventWhat,
  1302. ULONG cReasons,
  1303. CURSOR_DBNOTIFYREASON rgReasons[]
  1304. ) = 0;
  1305. virtual HRESULT STDMETHODCALLTYPE SyncAfter
  1306. (
  1307. DWORD dwEventWhat,
  1308. ULONG cReasons,
  1309. CURSOR_DBNOTIFYREASON rgReasons[]
  1310. ) = 0;
  1311. virtual HRESULT STDMETHODCALLTYPE DidEvent
  1312. (
  1313. DWORD dwEventWhat,
  1314. ULONG cReasons,
  1315. CURSOR_DBNOTIFYREASON rgReasons[]
  1316. ) = 0;
  1317. };
  1318. #else
  1319. /* C Language Binding */
  1320. extern const IID IID_INotifyDBEvents;
  1321. typedef struct INotifyDBEventsVtbl
  1322. {
  1323. HRESULT (STDMETHODCALLTYPE FAR *QueryInterface)
  1324. (
  1325. INotifyDBEvents FAR *this,
  1326. REFIID riid,
  1327. void **ppvObject
  1328. );
  1329. ULONG (STDMETHODCALLTYPE FAR *AddRef)
  1330. (
  1331. INotifyDBEvents FAR *this
  1332. );
  1333. ULONG (STDMETHODCALLTYPE FAR *Release)
  1334. (
  1335. INotifyDBEvents FAR *this
  1336. );
  1337. HRESULT (STDMETHODCALLTYPE FAR *OKToDo)
  1338. (
  1339. INotifyDBEvents FAR *this,
  1340. DWORD dwEventWhat,
  1341. ULONG cReasons,
  1342. CURSOR_DBNOTIFYREASON rgReasons[]
  1343. );
  1344. HRESULT (STDMETHODCALLTYPE FAR *Cancelled)
  1345. (
  1346. INotifyDBEvents FAR *this,
  1347. DWORD dwEventWhat,
  1348. ULONG cReasons,
  1349. CURSOR_DBNOTIFYREASON rgReasons[]
  1350. );
  1351. HRESULT (STDMETHODCALLTYPE FAR *SyncBefore)
  1352. (
  1353. INotifyDBEvents FAR *this,
  1354. DWORD dwEventWhat,
  1355. ULONG cReasons,
  1356. CURSOR_DBNOTIFYREASON rgReasons[]
  1357. );
  1358. HRESULT (STDMETHODCALLTYPE FAR *AboutToDo)
  1359. (
  1360. INotifyDBEvents FAR *this,
  1361. DWORD dwEventWhat,
  1362. ULONG cReasons,
  1363. CURSOR_DBNOTIFYREASON rgReasons[]
  1364. );
  1365. HRESULT (STDMETHODCALLTYPE FAR *FailedToDo)
  1366. (
  1367. INotifyDBEvents FAR *this,
  1368. DWORD dwEventWhat,
  1369. ULONG cReasons,
  1370. CURSOR_DBNOTIFYREASON rgReasons[]
  1371. );
  1372. HRESULT (STDMETHODCALLTYPE FAR *SyncAfter)
  1373. (
  1374. INotifyDBEvents FAR *this,
  1375. DWORD dwEventWhat,
  1376. ULONG cReasons,
  1377. CURSOR_DBNOTIFYREASON rgReasons[]
  1378. );
  1379. HRESULT (STDMETHODCALLTYPE FAR *DidEvent)
  1380. (
  1381. INotifyDBEvents FAR *this,
  1382. DWORD dwEventWhat,
  1383. ULONG cReasons,
  1384. CURSOR_DBNOTIFYREASON rgReasons[]
  1385. );
  1386. } INotifyDBEventsVtbl;
  1387. interface INotifyDBEvents
  1388. {
  1389. INotifyDBEventsVtbl FAR *lpVtbl;
  1390. } ;
  1391. #ifdef COBJMACROS
  1392. #define INotifyDBEvents_QueryInterface(pI, riid, ppvObject) \
  1393. (*(pI)->lpVtbl->QueryInterface)((pI), riid, ppvObject)
  1394. #define INotifyDBEvents_AddRef(pI) \
  1395. (*(pI)->lpVtbl->AddRef)((pI))
  1396. #define INotifyDBEvents_Release(pI) \
  1397. (*(pI)->lpVtbl->Release)((pI))
  1398. #define INotifyDBEvents_OKToDo(pI, dwEventWhat, cReasons, rgReasons) \
  1399. (*(pI)->lpVtbl->OKToDo)((pI), dwEventWhat, cReasons, rgReasons)
  1400. #define INotifyDBEvents_Cancelled(pI, dwEventWhat, cReasons, rgReasons) \
  1401. (*(pI)->lpVtbl->Cancelled)((pI), dwEventWhat, cReasons, rgReasons)
  1402. #define INotifyDBEvents_SyncBefore(pI, dwEventWhat, cReasons, rgReasons) \
  1403. (*(pI)->lpVtbl->SyncBefore)((pI), dwEventWhat, cReasons, rgReasons)
  1404. #define INotifyDBEvents_AboutToDo(pI, dwEventWhat, cReasons, rgReasons) \
  1405. (*(pI)->lpVtbl->AboutToDo)((pI), dwEventWhat, cReasons, rgReasons)
  1406. #define INotifyDBEvents_FailedToDo(pI, dwEventWhat, cReasons, rgReasons) \
  1407. (*(pI)->lpVtbl->FailedToDo)((pI), dwEventWhat, cReasons, rgReasons)
  1408. #define INotifyDBEvents_SyncAfter(pI, dwEventWhat, cReasons, rgReasons) \
  1409. (*(pI)->lpVtbl->SyncAfter)((pI), dwEventWhat, cReasons, rgReasons)
  1410. #define INotifyDBEvents_DidEvent(pI, dwEventWhat, cReasons, rgReasons) \
  1411. (*(pI)->lpVtbl->DidEvent)((pI), dwEventWhat, cReasons, rgReasons)
  1412. #endif /* COBJMACROS */
  1413. #endif
  1414. #ifdef __cplusplus
  1415. }
  1416. #endif
  1417. #define __OCDB_H_
  1418. #endif // __OCDB_H_