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.

250 lines
9.2 KiB

  1. #ifndef VTAPI_H
  2. #define VTAPI_H
  3. #define VTAPI
  4. /* Typedefs for dispatched APIs. */
  5. /* Please keep in alphabetical order */
  6. typedef ERR VTAPI VTFNAddColumn(JET_VSESID sesid, JET_VTID vtid,
  7. const char *szColumn, const JET_COLUMNDEF *pcolumndef,
  8. const void *pvDefault, unsigned long cbDefault,
  9. JET_COLUMNID *pcolumnid);
  10. typedef ERR VTAPI VTFNCloseTable(JET_VSESID sesid, JET_VTID vtid);
  11. typedef ERR VTAPI VTFNComputeStats(JET_VSESID sesid, JET_VTID vtid);
  12. typedef ERR VTAPI VTFNCopyBookmarks(JET_SESID sesid, JET_VTID vtidSrc,
  13. JET_TABLEID tableidDest, JET_COLUMNID columnidDest,
  14. unsigned long crecMax);
  15. typedef ERR VTAPI VTFNCreateIndex(JET_VSESID sesid, JET_VTID vtid,
  16. const char *szIndexName, JET_GRBIT grbit,
  17. const char *szKey, unsigned long cbKey, unsigned long lDensity);
  18. typedef ERR VTAPI VTFNCreateReference(JET_VSESID sesid, JET_VTID vtid,
  19. const char *szReferenceName, const char *szColumns,
  20. const char *szReferencedTable,
  21. const char *szReferencedColumns, JET_GRBIT grbit);
  22. typedef ERR VTAPI VTFNDelete(JET_VSESID sesid, JET_VTID vtid);
  23. typedef ERR VTAPI VTFNDeleteColumn(JET_VSESID sesid, JET_VTID vtid,
  24. const char *szColumn);
  25. typedef ERR VTAPI VTFNDeleteIndex(JET_VSESID sesid, JET_VTID vtid,
  26. const char *szIndexName);
  27. typedef ERR VTAPI VTFNDeleteReference(JET_VSESID sesid, JET_VTID vtid,
  28. const char *szReferenceName);
  29. typedef ERR VTAPI VTFNDupCursor(JET_VSESID sesid, JET_VTID vtid,
  30. JET_TABLEID *ptableid, JET_GRBIT grbit);
  31. typedef ERR VTAPI VTFNEmptyTable(JET_VSESID sesid, JET_VTID vtid);
  32. typedef ERR VTAPI VTFNGetBookmark(JET_VSESID sesid, JET_VTID vtid,
  33. void *pvBookmark, unsigned long cbMax,
  34. unsigned long *pcbActual);
  35. typedef ERR VTAPI VTFNGetChecksum(JET_VSESID sesid, JET_VTID vtid,
  36. unsigned long *pChecksum);
  37. typedef ERR VTAPI VTFNGetCurrentIndex(JET_VSESID sesid, JET_VTID vtid,
  38. char *szIndexName, unsigned long cchIndexName);
  39. typedef ERR VTAPI VTFNGetCursorInfo(JET_VSESID sesid, JET_VTID vtid,
  40. void *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  41. typedef ERR VTAPI VTFNGetRecordPosition(JET_VSESID sesid, JET_VTID vtid,
  42. JET_RECPOS *pkeypos, unsigned long cbKeypos);
  43. typedef ERR VTAPI VTFNGetTableColumnInfo(JET_VSESID sesid, JET_VTID vtid,
  44. const char *szColumnName, void *pvResult,
  45. unsigned long cbMax, unsigned long InfoLevel);
  46. typedef ERR VTAPI VTFNGetTableIndexInfo(JET_VSESID sesid, JET_VTID vtid,
  47. const char *szIndexName, void *pvResult,
  48. unsigned long cbMax, unsigned long InfoLevel);
  49. typedef ERR VTAPI VTFNGetTableReferenceInfo(JET_VSESID sesid, JET_VTID vtid,
  50. const char *szReferenceName, void *pvResult,
  51. unsigned long cbMax, unsigned long InfoLevel);
  52. typedef ERR VTAPI VTFNGetTableInfo(JET_VSESID sesid, JET_VTID vtid,
  53. void *pvResult, unsigned long cbMax, unsigned long InfoLevel);
  54. typedef ERR VTAPI VTFNGotoBookmark(JET_VSESID sesid, JET_VTID vtid,
  55. void *pvBookmark, unsigned long cbBookmark);
  56. typedef ERR VTAPI VTFNGotoPosition(JET_VSESID sesid, JET_VTID vtid,
  57. JET_RECPOS *precpos);
  58. typedef ERR VTAPI VTFNVtIdle(JET_VSESID sesid, JET_VTID vtid);
  59. typedef ERR VTAPI VTFNMakeKey(JET_VSESID sesid, JET_VTID vtid,
  60. const void *pvData, unsigned long cbData, JET_GRBIT grbit);
  61. typedef ERR VTAPI VTFNMove(JET_VSESID sesid, JET_VTID vtid,
  62. long cRow, JET_GRBIT grbit);
  63. typedef ERR VTAPI VTFNNotifyBeginTrans(JET_VSESID sesid, JET_VTID vtid);
  64. typedef ERR VTAPI VTFNNotifyCommitTrans(JET_VSESID sesid, JET_VTID vtid,
  65. JET_GRBIT grbit);
  66. typedef ERR VTAPI VTFNNotifyRollback(JET_VSESID sesid, JET_VTID vtid,
  67. JET_GRBIT grbit);
  68. typedef ERR VTAPI VTFNNotifyUpdateUfn(JET_VSESID sesid, JET_VTID vtid);
  69. typedef ERR VTAPI VTFNPrepareUpdate(JET_VSESID sesid, JET_VTID vtid,
  70. unsigned long prep);
  71. typedef ERR VTAPI VTFNRenameColumn(JET_VSESID sesid, JET_VTID vtid,
  72. const char *szColumn, const char *szColumnNew);
  73. typedef ERR VTAPI VTFNRenameIndex(JET_VSESID sesid, JET_VTID vtid,
  74. const char *szIndex, const char *szIndexNew);
  75. typedef ERR VTAPI VTFNRenameReference(JET_VSESID sesid, JET_VTID vtid,
  76. const char *szReference, const char *szReferenceNew);
  77. typedef ERR VTAPI VTFNRetrieveColumn(JET_VSESID sesid, JET_VTID vtid,
  78. JET_COLUMNID columnid, void *pvData, unsigned long cbData,
  79. unsigned long *pcbActual, JET_GRBIT grbit,
  80. JET_RETINFO *pretinfo);
  81. typedef ERR VTAPI VTFNRetrieveKey(JET_VSESID sesid, JET_VTID vtid,
  82. void *pvKey, unsigned long cbMax,
  83. unsigned long *pcbActual, JET_GRBIT grbit);
  84. typedef ERR VTAPI VTFNSeek(JET_VSESID sesid, JET_VTID vtid, JET_GRBIT grbit);
  85. typedef ERR VTAPI VTFNSetCurrentIndex(JET_VSESID sesid, JET_VTID vtid,
  86. const char *szIndexName);
  87. typedef ERR VTAPI VTFNSetColumn(JET_VSESID sesid, JET_VTID vtid,
  88. JET_COLUMNID columnid, const void *pvData,
  89. unsigned long cbData, JET_GRBIT grbit, JET_SETINFO *psetinfo);
  90. typedef ERR VTAPI VTFNSetIndexRange(JET_VSESID sesid, JET_VTID vtid,
  91. JET_GRBIT grbit);
  92. typedef ERR VTAPI VTFNUpdate(JET_VSESID sesid, JET_VTID vtid,
  93. void *pvBookmark, unsigned long cbBookmark,
  94. unsigned long *pcbActual);
  95. /* The following structure is that used to allow dispatching to */
  96. /* a VT provider. Each VT provider must create an instance of */
  97. /* this structure and give the pointer to this instance when */
  98. /* allocating a table id. */
  99. typedef struct VTDBGDEF {
  100. unsigned short cbStruct;
  101. unsigned short filler;
  102. char szName[32];
  103. unsigned long dwRFS;
  104. unsigned long dwRFSMask[4];
  105. } VTDBGDEF;
  106. /* Please add to the end of the table */
  107. typedef struct tagVTFNDEF {
  108. unsigned short cbStruct;
  109. unsigned short filler;
  110. const VTDBGDEF *pvtdbgdef;
  111. VTFNAddColumn *pfnAddColumn;
  112. VTFNCloseTable *pfnCloseTable;
  113. VTFNComputeStats *pfnComputeStats;
  114. VTFNCopyBookmarks *pfnCopyBookmarks;
  115. VTFNCreateIndex *pfnCreateIndex;
  116. VTFNCreateReference *pfnCreateReference;
  117. VTFNDelete *pfnDelete;
  118. VTFNDeleteColumn *pfnDeleteColumn;
  119. VTFNDeleteIndex *pfnDeleteIndex;
  120. VTFNDeleteReference *pfnDeleteReference;
  121. VTFNDupCursor *pfnDupCursor;
  122. VTFNGetBookmark *pfnGetBookmark;
  123. VTFNGetChecksum *pfnGetChecksum;
  124. VTFNGetCurrentIndex *pfnGetCurrentIndex;
  125. VTFNGetCursorInfo *pfnGetCursorInfo;
  126. VTFNGetRecordPosition *pfnGetRecordPosition;
  127. VTFNGetTableColumnInfo *pfnGetTableColumnInfo;
  128. VTFNGetTableIndexInfo *pfnGetTableIndexInfo;
  129. VTFNGetTableInfo *pfnGetTableInfo;
  130. VTFNGetTableReferenceInfo *pfnGetTableReferenceInfo;
  131. VTFNGotoBookmark *pfnGotoBookmark;
  132. VTFNGotoPosition *pfnGotoPosition;
  133. VTFNVtIdle *pfnVtIdle;
  134. VTFNMakeKey *pfnMakeKey;
  135. VTFNMove *pfnMove;
  136. VTFNNotifyBeginTrans *pfnNotifyBeginTrans;
  137. VTFNNotifyCommitTrans *pfnNotifyCommitTrans;
  138. VTFNNotifyRollback *pfnNotifyRollback;
  139. VTFNNotifyUpdateUfn *pfnNotifyUpdateUfn;
  140. VTFNPrepareUpdate *pfnPrepareUpdate;
  141. VTFNRenameColumn *pfnRenameColumn;
  142. VTFNRenameIndex *pfnRenameIndex;
  143. VTFNRenameReference *pfnRenameReference;
  144. VTFNRetrieveColumn *pfnRetrieveColumn;
  145. VTFNRetrieveKey *pfnRetrieveKey;
  146. VTFNSeek *pfnSeek;
  147. VTFNSetCurrentIndex *pfnSetCurrentIndex;
  148. VTFNSetColumn *pfnSetColumn;
  149. VTFNSetIndexRange *pfnSetIndexRange;
  150. VTFNUpdate *pfnUpdate;
  151. VTFNEmptyTable *pfnEmptyTable;
  152. } VTFNDEF;
  153. /* The following entry points are to be used by VT providers */
  154. /* in their VTFNDEF structures for any function that is not */
  155. /* provided. This functions return JET_errIllegalOperation */
  156. extern VTFNAddColumn ErrIllegalAddColumn;
  157. extern VTFNCloseTable ErrIllegalCloseTable;
  158. extern VTFNComputeStats ErrIllegalComputeStats;
  159. extern VTFNCopyBookmarks ErrIllegalCopyBookmarks;
  160. extern VTFNCreateIndex ErrIllegalCreateIndex;
  161. extern VTFNCreateReference ErrIllegalCreateReference;
  162. extern VTFNDelete ErrIllegalDelete;
  163. extern VTFNDeleteColumn ErrIllegalDeleteColumn;
  164. extern VTFNDeleteIndex ErrIllegalDeleteIndex;
  165. extern VTFNDeleteReference ErrIllegalDeleteReference;
  166. extern VTFNDupCursor ErrIllegalDupCursor;
  167. extern VTFNEmptyTable ErrIllegalEmptyTable;
  168. extern VTFNGetBookmark ErrIllegalGetBookmark;
  169. extern VTFNGetChecksum ErrIllegalGetChecksum;
  170. extern VTFNGetCurrentIndex ErrIllegalGetCurrentIndex;
  171. extern VTFNGetCursorInfo ErrIllegalGetCursorInfo;
  172. extern VTFNGetRecordPosition ErrIllegalGetRecordPosition;
  173. extern VTFNGetTableColumnInfo ErrIllegalGetTableColumnInfo;
  174. extern VTFNGetTableIndexInfo ErrIllegalGetTableIndexInfo;
  175. extern VTFNGetTableInfo ErrIllegalGetTableInfo;
  176. extern VTFNGetTableReferenceInfo ErrIllegalGetTableReferenceInfo;
  177. extern VTFNGotoBookmark ErrIllegalGotoBookmark;
  178. extern VTFNGotoPosition ErrIllegalGotoPosition;
  179. extern VTFNVtIdle ErrIllegalVtIdle;
  180. extern VTFNMakeKey ErrIllegalMakeKey;
  181. extern VTFNMove ErrIllegalMove;
  182. extern VTFNNotifyBeginTrans ErrIllegalNotifyBeginTrans;
  183. extern VTFNNotifyCommitTrans ErrIllegalNotifyCommitTrans;
  184. extern VTFNNotifyRollback ErrIllegalNotifyRollback;
  185. extern VTFNNotifyUpdateUfn ErrIllegalNotifyUpdateUfn;
  186. extern VTFNPrepareUpdate ErrIllegalPrepareUpdate;
  187. extern VTFNRenameColumn ErrIllegalRenameColumn;
  188. extern VTFNRenameIndex ErrIllegalRenameIndex;
  189. extern VTFNRenameReference ErrIllegalRenameReference;
  190. extern VTFNRetrieveColumn ErrIllegalRetrieveColumn;
  191. extern VTFNRetrieveKey ErrIllegalRetrieveKey;
  192. extern VTFNSeek ErrIllegalSeek;
  193. extern VTFNSetCurrentIndex ErrIllegalSetCurrentIndex;
  194. extern VTFNSetColumn ErrIllegalSetColumn;
  195. extern VTFNSetIndexRange ErrIllegalSetIndexRange;
  196. extern VTFNUpdate ErrIllegalUpdate;
  197. #endif /* !VTAPI_H */