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.

2827 lines
117 KiB

  1. #if _MSC_VER > 1000
  2. #pragma once
  3. #endif
  4. #define eseVersion 0x6000
  5. // copied from basestd.h to make LONG_PTR available.
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. //
  10. // The following types are guaranteed to be signed and 32 bits wide.
  11. //
  12. typedef int LONG32, *PLONG32;
  13. typedef int INT32, *PINT32;
  14. //
  15. // The following types are guaranteed to be unsigned and 32 bits wide.
  16. //
  17. typedef unsigned int ULONG32, *PULONG32;
  18. typedef unsigned int DWORD32, *PDWORD32;
  19. typedef unsigned int UINT32, *PUINT32;
  20. //
  21. // The INT_PTR is guaranteed to be the same size as a pointer. Its
  22. // size with change with pointer size (32/64). It should be used
  23. // anywhere that a pointer is cast to an integer type. UINT_PTR is
  24. // the unsigned variation.
  25. //
  26. // __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
  27. //
  28. #if ( 501 < __midl )
  29. typedef __int3264 INT_PTR, *PINT_PTR;
  30. typedef unsigned __int3264 UINT_PTR, *PUINT_PTR;
  31. typedef __int3264 LONG_PTR, *PLONG_PTR;
  32. typedef unsigned __int3264 ULONG_PTR, *PULONG_PTR;
  33. #else // midl64
  34. // old midl and C++ compiler
  35. #ifdef _WIN64
  36. typedef __int64 INT_PTR, *PINT_PTR;
  37. typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
  38. typedef __int64 LONG_PTR, *PLONG_PTR;
  39. typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
  40. #define __int3264 __int64
  41. #else
  42. typedef int INT_PTR, *PINT_PTR;
  43. typedef unsigned int UINT_PTR, *PUINT_PTR;
  44. typedef long LONG_PTR, *PLONG_PTR;
  45. typedef unsigned long ULONG_PTR, *PULONG_PTR;
  46. #define __int3264 __int32
  47. #endif
  48. #endif //midl64
  49. typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
  50. //
  51. // The following types are guaranteed to be signed and 64 bits wide.
  52. //
  53. typedef __int64 LONG64, *PLONG64;
  54. typedef __int64 INT64, *PINT64;
  55. //
  56. // The following types are guaranteed to be unsigned and 64 bits wide.
  57. //
  58. typedef unsigned __int64 ULONG64, *PULONG64;
  59. typedef unsigned __int64 DWORD64, *PDWORD64;
  60. typedef unsigned __int64 UINT64, *PUINT64;
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #if !defined(_JET_INCLUDED)
  65. #define _JET_INCLUDED
  66. #ifdef __cplusplus
  67. extern "C" {
  68. #endif
  69. #define JET_cbPage 4096 // UNDONE: Remove when no more components reference this.
  70. #if defined(_M_ALPHA) || defined(_M_IA64)
  71. #include <pshpack8.h>
  72. #else
  73. #include <pshpack4.h>
  74. #endif
  75. #define JET_API __stdcall
  76. #define JET_NODSAPI __stdcall
  77. typedef long JET_ERR;
  78. typedef ULONG_PTR JET_HANDLE; /* backup file handle */
  79. typedef ULONG_PTR JET_INSTANCE; /* Instance Identifier */
  80. typedef ULONG_PTR JET_SESID; /* Session Identifier */
  81. typedef ULONG_PTR JET_TABLEID; /* Table Identifier */
  82. typedef ULONG_PTR JET_LS; /* Local Storage */
  83. typedef unsigned long JET_COLUMNID; /* Column Identifier */
  84. typedef struct tagJET_INDEXID
  85. {
  86. unsigned long cbStruct;
  87. unsigned char rgbIndexId[sizeof(ULONG_PTR)+sizeof(unsigned long)+sizeof(unsigned long)];
  88. } JET_INDEXID;
  89. typedef unsigned long JET_DBID; /* Database Identifier */
  90. typedef unsigned long JET_OBJTYP; /* Object Type */
  91. typedef unsigned long JET_COLTYP; /* Column Type */
  92. typedef unsigned long JET_GRBIT; /* Group of Bits */
  93. typedef unsigned long JET_SNP; /* Status Notification Process */
  94. typedef unsigned long JET_SNT; /* Status Notification Type */
  95. typedef unsigned long JET_SNC; /* Status Notification Code */
  96. typedef double JET_DATESERIAL; /* JET_coltypDateTime format */
  97. typedef unsigned long JET_DLLID; /* ID of DLL for hook functions */
  98. typedef unsigned long JET_CBTYP; /* Callback Types */
  99. typedef JET_ERR (__stdcall *JET_PFNSTATUS)(JET_SESID sesid, JET_SNP snp, JET_SNT snt, void *pv);
  100. /* required for Exchange to make RSTMAP RPC capable
  101. /**/
  102. #ifdef MIDL_PASS
  103. #define xRPC_STRING [string]
  104. #else
  105. #define xRPC_STRING
  106. #if !defined(_NATIVE_WCHAR_T_DEFINED)
  107. typedef unsigned short WCHAR;
  108. #else
  109. typedef wchar_t WCHAR;
  110. #endif
  111. #endif
  112. typedef struct
  113. {
  114. xRPC_STRING char *szDatabaseName;
  115. xRPC_STRING char *szNewDatabaseName;
  116. } JET_RSTMAP; /* restore map */
  117. /* required for Exchange unicode support
  118. /**/
  119. #define UNICODE_RSTMAP
  120. typedef struct tagJET_RSTMAPW {
  121. xRPC_STRING WCHAR *wszDatabaseName;
  122. xRPC_STRING WCHAR *wszNewDatabaseName;
  123. } JET_RSTMAPW, *PJET_RSTMAPW;
  124. // For edbutil convert only.
  125. typedef struct tagCONVERT
  126. {
  127. char *szOldDll;
  128. union
  129. {
  130. unsigned long fFlags;
  131. struct
  132. {
  133. unsigned long fSchemaChangesOnly:1;
  134. };
  135. };
  136. } JET_CONVERT;
  137. typedef enum
  138. {
  139. opDBUTILConsistency,
  140. opDBUTILDumpData,
  141. opDBUTILDumpMetaData,
  142. opDBUTILDumpPage,
  143. opDBUTILDumpNode,
  144. opDBUTILDumpSpace,
  145. opDBUTILSetHeaderState,
  146. opDBUTILDumpHeader,
  147. opDBUTILDumpLogfile,
  148. opDBUTILDumpLogfileTrackNode,
  149. opDBUTILDumpCheckpoint,
  150. opDBUTILEDBDump,
  151. opDBUTILEDBRepair,
  152. opDBUTILMunge,
  153. opDBUTILEDBScrub,
  154. opDBUTILSLVMove,
  155. opDBUTILDBConvertRecords,
  156. opDBUTILDBDefragment
  157. } DBUTIL_OP;
  158. typedef enum
  159. {
  160. opEDBDumpTables,
  161. opEDBDumpIndexes,
  162. opEDBDumpColumns,
  163. opEDBDumpCallbacks,
  164. opEDBDumpPage,
  165. } EDBDUMP_OP;
  166. typedef struct tagDBUTIL
  167. {
  168. unsigned long cbStruct;
  169. JET_SESID sesid;
  170. JET_DBID dbid;
  171. JET_TABLEID tableid;
  172. DBUTIL_OP op;
  173. EDBDUMP_OP edbdump;
  174. JET_GRBIT grbitOptions;
  175. char *szDatabase;
  176. char *szSLV;
  177. char *szBackup;
  178. char *szTable;
  179. char *szIndex;
  180. char *szIntegPrefix;
  181. long pgno;
  182. long iline;
  183. long lGeneration;
  184. long isec;
  185. long ib;
  186. long cRetry;
  187. void * pfnCallback;
  188. void * pvCallback;
  189. } JET_DBUTIL;
  190. #define JET_bitDBUtilOptionAllNodes 0x00000001
  191. #define JET_bitDBUtilOptionKeyStats 0x00000002
  192. #define JET_bitDBUtilOptionPageDump 0x00000004
  193. #define JET_bitDBUtilOptionDumpVerbose 0x10000000 // DEBUG only
  194. #define JET_bitDBUtilOptionCheckBTree 0x20000000 // DEBUG only
  195. #define JET_bitDBUtilOptionStats 0x00000008
  196. #define JET_bitDBUtilOptionVerbose 0x00000010
  197. #define JET_bitDBUtilOptionIgnoreErrors 0x00000020
  198. #define JET_bitDBUtilOptionVerify 0x00000040
  199. #define JET_bitDBUtilOptionReportErrors 0x00000080
  200. #define JET_bitDBUtilOptionDontRepair 0x00000100
  201. #define JET_bitDBUtilOptionRepairAll 0x00000200
  202. #define JET_bitDBUtilOptionRepairIndexes 0x00000400
  203. #define JET_bitDBUtilOptionDontBuildIndexes 0x00000800
  204. // Online defragmentation options
  205. #define JET_bitDefragmentBatchStart 0x00000001
  206. #define JET_bitDefragmentBatchStop 0x00000002
  207. #define JET_bitDefragmentTest 0x00000004 /* run internal tests (non-RTM builds only) */
  208. #define JET_bitDefragmentSLVBatchStart 0x00000008
  209. #define JET_bitDefragmentSLVBatchStop 0x00000010
  210. #define JET_bitDefragmentScrubSLV 0x00000020 /* syncronously zero free pages in the streaming file */
  211. #define JET_bitDefragmentAvailSpaceTreesOnly 0x00000040 /* only defrag AvailExt trees */
  212. #define JET_bitDefragmentSparsifyDatabase 0x00000080 /* synchronously make space sparse */
  213. #define JET_bitDefragmentSparsifyStreamingFile 0x00000100 /* synchronously make space sparse */
  214. #define JET_bitDefragmentSFS 0x00000200 /* defragment and compact the SFS volume */
  215. /* Callback-function types */
  216. #define JET_cbtypNull 0x00000000
  217. #define JET_cbtypFinalize 0x00000001 /* a finalizable column has gone to zero */
  218. #define JET_cbtypBeforeInsert 0x00000002 /* about to insert a record */
  219. #define JET_cbtypAfterInsert 0x00000004 /* finished inserting a record */
  220. #define JET_cbtypBeforeReplace 0x00000008 /* about to modify a record */
  221. #define JET_cbtypAfterReplace 0x00000010 /* finished modifying a record */
  222. #define JET_cbtypBeforeDelete 0x00000020 /* about to delete a record */
  223. #define JET_cbtypAfterDelete 0x00000040 /* finished deleting the record */
  224. #define JET_cbtypUserDefinedDefaultValue 0x00000080 /* calculating a user-defined default */
  225. #define JET_cbtypOnlineDefragCompleted 0x00000100 /* a call to JetDefragment2 has completed */
  226. #define JET_cbtypFreeCursorLS 0x00000200 /* the Local Storage associated with a cursor must be freed */
  227. #define JET_cbtypFreeTableLS 0x00000400 /* the Local Storage associated with a table must be freed */
  228. #define JET_cbtypDTCQueryPreparedTransaction 0x00001000 /* recovery is attempting to resolve a PreparedToCommit transaction */
  229. /* Callback-function prototype */
  230. typedef JET_ERR (__stdcall *JET_CALLBACK)(
  231. JET_SESID sesid,
  232. JET_DBID dbid,
  233. JET_TABLEID tableid,
  234. JET_CBTYP cbtyp,
  235. void * pvArg1,
  236. void * pvArg2,
  237. void * pvContext,
  238. ULONG_PTR ulUnused );
  239. /* Session information bits */
  240. #define JET_bitCIMCommitted 0x00000001
  241. #define JET_bitCIMDirty 0x00000002
  242. #define JET_bitAggregateTransaction 0x00000008
  243. /* Status Notification Structures */
  244. typedef struct /* Status Notification Progress */
  245. {
  246. unsigned long cbStruct; /* Size of this structure */
  247. unsigned long cunitDone; /* Number of units of work completed */
  248. unsigned long cunitTotal; /* Total number of units of work */
  249. } JET_SNPROG;
  250. typedef struct /* Status Notification Message */
  251. {
  252. unsigned long cbStruct; /* Size of this structure */
  253. JET_SNC snc; /* Status Notification Code */
  254. unsigned long ul; /* Numeric identifier */
  255. char sz[256]; /* Identifier */
  256. } JET_SNMSG;
  257. typedef struct
  258. {
  259. unsigned long cbStruct;
  260. unsigned long cbFilesizeLow; // file's current size (low DWORD)
  261. unsigned long cbFilesizeHigh; // file's current size (high DWORD)
  262. unsigned long cbFreeSpaceRequiredLow; // estimate of free disk space required for in-place upgrade (low DWORD)
  263. unsigned long cbFreeSpaceRequiredHigh;// estimate of free disk space required for in-place upgrade (high DWORD)
  264. unsigned long csecToUpgrade; // estimate of time required, in seconds, for upgrade
  265. union
  266. {
  267. unsigned long ulFlags;
  268. struct
  269. {
  270. unsigned long fUpgradable:1;
  271. unsigned long fAlreadyUpgraded:1;
  272. };
  273. };
  274. } JET_DBINFOUPGRADE;
  275. typedef struct
  276. {
  277. unsigned long cbStruct;
  278. JET_OBJTYP objtyp;
  279. JET_DATESERIAL dtCreate; // XXX -- to be deleted
  280. JET_DATESERIAL dtUpdate; // XXX -- to be deleted
  281. JET_GRBIT grbit;
  282. unsigned long flags;
  283. unsigned long cRecord;
  284. unsigned long cPage;
  285. } JET_OBJECTINFO;
  286. /* The following flags appear in the grbit field above */
  287. #define JET_bitTableInfoUpdatable 0x00000001
  288. #define JET_bitTableInfoBookmark 0x00000002
  289. #define JET_bitTableInfoRollback 0x00000004
  290. #define JET_bitTableSequential 0x00008000
  291. /* The following flags occur in the flags field above */
  292. #define JET_bitObjectSystem 0x80000000 // Internal use only
  293. #define JET_bitObjectTableFixedDDL 0x40000000 // Table's DDL is fixed
  294. #define JET_bitObjectTableTemplate 0x20000000 // Table's DDL is inheritable (implies FixedDDL)
  295. #define JET_bitObjectTableDerived 0x10000000 // Table's DDL is inherited from a template table
  296. #define JET_bitObjectSystemDynamic (JET_bitObjectSystem|0x08000000) // Internal use only (dynamic system objects)
  297. #define JET_bitObjectTableNoFixedVarColumnsInDerivedTables 0x04000000 // used in conjunction with JET_bitObjectTableTemplate
  298. // to disallow fixed/var columns in derived tables (so that
  299. // fixed/var columns may be added to the template in the future)
  300. typedef struct
  301. {
  302. unsigned long cbStruct;
  303. JET_TABLEID tableid;
  304. unsigned long cRecord;
  305. JET_COLUMNID columnidcontainername;
  306. JET_COLUMNID columnidobjectname;
  307. JET_COLUMNID columnidobjtyp;
  308. JET_COLUMNID columniddtCreate; // XXX -- to be deleted
  309. JET_COLUMNID columniddtUpdate; // XXX -- to be deleted
  310. JET_COLUMNID columnidgrbit;
  311. JET_COLUMNID columnidflags;
  312. JET_COLUMNID columnidcRecord; /* Level 2 info */
  313. JET_COLUMNID columnidcPage; /* Level 2 info */
  314. } JET_OBJECTLIST;
  315. #define cObjectInfoCols 9
  316. typedef struct
  317. {
  318. unsigned long cbStruct;
  319. JET_TABLEID tableid;
  320. unsigned long cRecord;
  321. JET_COLUMNID columnidPresentationOrder;
  322. JET_COLUMNID columnidcolumnname;
  323. JET_COLUMNID columnidcolumnid;
  324. JET_COLUMNID columnidcoltyp;
  325. JET_COLUMNID columnidCountry;
  326. JET_COLUMNID columnidLangid;
  327. JET_COLUMNID columnidCp;
  328. JET_COLUMNID columnidCollate;
  329. JET_COLUMNID columnidcbMax;
  330. JET_COLUMNID columnidgrbit;
  331. JET_COLUMNID columnidDefault;
  332. JET_COLUMNID columnidBaseTableName;
  333. JET_COLUMNID columnidBaseColumnName;
  334. JET_COLUMNID columnidDefinitionName;
  335. } JET_COLUMNLIST;
  336. #define cColumnInfoCols 14
  337. typedef struct
  338. {
  339. unsigned long cbStruct;
  340. JET_COLUMNID columnid;
  341. JET_COLTYP coltyp;
  342. unsigned short wCountry;
  343. unsigned short langid;
  344. unsigned short cp;
  345. unsigned short wCollate; /* Must be 0 */
  346. unsigned long cbMax;
  347. JET_GRBIT grbit;
  348. } JET_COLUMNDEF;
  349. typedef struct
  350. {
  351. unsigned long cbStruct;
  352. JET_COLUMNID columnid;
  353. JET_COLTYP coltyp;
  354. unsigned short wCountry;
  355. unsigned short langid;
  356. unsigned short cp;
  357. unsigned short wFiller; /* Must be 0 */
  358. unsigned long cbMax;
  359. JET_GRBIT grbit;
  360. char szBaseTableName[256];
  361. char szBaseColumnName[256];
  362. } JET_COLUMNBASE;
  363. typedef struct
  364. {
  365. unsigned long cbStruct;
  366. JET_TABLEID tableid;
  367. unsigned long cRecord;
  368. JET_COLUMNID columnidindexname;
  369. JET_COLUMNID columnidgrbitIndex;
  370. JET_COLUMNID columnidcKey;
  371. JET_COLUMNID columnidcEntry;
  372. JET_COLUMNID columnidcPage;
  373. JET_COLUMNID columnidcColumn;
  374. JET_COLUMNID columnidiColumn;
  375. JET_COLUMNID columnidcolumnid;
  376. JET_COLUMNID columnidcoltyp;
  377. JET_COLUMNID columnidCountry;
  378. JET_COLUMNID columnidLangid;
  379. JET_COLUMNID columnidCp;
  380. JET_COLUMNID columnidCollate;
  381. JET_COLUMNID columnidgrbitColumn;
  382. JET_COLUMNID columnidcolumnname;
  383. JET_COLUMNID columnidLCMapFlags;
  384. } JET_INDEXLIST;
  385. #define cIndexInfoCols 15
  386. typedef struct tag_JET_COLUMNCREATE
  387. {
  388. unsigned long cbStruct; // size of this structure (for future expansion)
  389. char *szColumnName; // column name
  390. JET_COLTYP coltyp; // column type
  391. unsigned long cbMax; // the maximum length of this column (only relevant for binary and text columns)
  392. JET_GRBIT grbit; // column options
  393. void *pvDefault; // default value (NULL if none)
  394. unsigned long cbDefault; // length of default value
  395. unsigned long cp; // code page (for text columns only)
  396. JET_COLUMNID columnid; // returned column id
  397. JET_ERR err; // returned error code
  398. } JET_COLUMNCREATE;
  399. // This is the information needed to create a column with a user-defined default. It should be passed in using
  400. // the pvDefault and cbDefault in a JET_COLUMNCREATE structure
  401. typedef struct tag_JET_USERDEFINEDDEFAULT
  402. {
  403. char * szCallback;
  404. unsigned char * pbUserData;
  405. unsigned long cbUserData;
  406. char * szDependantColumns;
  407. } JET_USERDEFINEDDEFAULT;
  408. typedef struct tagJET_INDEXCREATEOLD // [4/15/97]: to be phased out eventually (laurionb)
  409. {
  410. unsigned long cbStruct; // size of this structure (for future expansion)
  411. char *szIndexName; // index name
  412. char *szKey; // index key
  413. unsigned long cbKey; // length of key
  414. JET_GRBIT grbit; // index options
  415. unsigned long ulDensity; // index density
  416. JET_ERR err; // returned error code
  417. } JET_INDEXCREATEOLD;
  418. typedef struct tagJET_CONDITIONALCOLUMN
  419. {
  420. unsigned long cbStruct; // size of this structure (for future expansion)
  421. char *szColumnName; // column that we are conditionally indexed on
  422. JET_GRBIT grbit; // conditional column options
  423. } JET_CONDITIONALCOLUMN;
  424. typedef struct tagJET_UNICODEINDEX
  425. {
  426. unsigned long lcid;
  427. unsigned long dwMapFlags;
  428. } JET_UNICODEINDEX;
  429. typedef struct tagJET_INDEXCREATE
  430. {
  431. unsigned long cbStruct; // size of this structure (for future expansion)
  432. char *szIndexName; // index name
  433. char *szKey; // index key
  434. unsigned long cbKey; // length of key
  435. JET_GRBIT grbit; // index options
  436. unsigned long ulDensity; // index density
  437. union
  438. {
  439. ULONG_PTR lcid; // lcid for the index (if JET_bitIndexUnicode NOT specified)
  440. JET_UNICODEINDEX *pidxunicode; // pointer to JET_UNICODEINDEX struct (if JET_bitIndexUnicode specified)
  441. };
  442. unsigned long cbVarSegMac; // maximum length of variable length columns in index key
  443. JET_CONDITIONALCOLUMN *rgconditionalcolumn; // pointer to conditional column structure
  444. unsigned long cConditionalColumn; // number of conditional columns
  445. JET_ERR err; // returned error code
  446. } JET_INDEXCREATE;
  447. typedef struct tagJET_TABLECREATE
  448. {
  449. unsigned long cbStruct; // size of this structure (for future expansion)
  450. char *szTableName; // name of table to create.
  451. char *szTemplateTableName; // name of table from which to inherit base DDL
  452. unsigned long ulPages; // initial pages to allocate for table.
  453. unsigned long ulDensity; // table density.
  454. JET_COLUMNCREATE *rgcolumncreate; // array of column creation info
  455. unsigned long cColumns; // number of columns to create
  456. JET_INDEXCREATE *rgindexcreate; // array of index creation info
  457. unsigned long cIndexes; // number of indexes to create
  458. JET_GRBIT grbit;
  459. JET_TABLEID tableid; // returned tableid.
  460. unsigned long cCreated; // count of objects created (columns+table+indexes).
  461. } JET_TABLECREATE;
  462. typedef struct tagJET_TABLECREATE2
  463. {
  464. unsigned long cbStruct; // size of this structure (for future expansion)
  465. char *szTableName; // name of table to create.
  466. char *szTemplateTableName; // name of table from which to inherit base DDL
  467. unsigned long ulPages; // initial pages to allocate for table.
  468. unsigned long ulDensity; // table density.
  469. JET_COLUMNCREATE *rgcolumncreate; // array of column creation info
  470. unsigned long cColumns; // number of columns to create
  471. JET_INDEXCREATE *rgindexcreate; // array of index creation info
  472. unsigned long cIndexes; // number of indexes to create
  473. char *szCallback; // callback to use for this table
  474. JET_CBTYP cbtyp; // when the callback should be called
  475. JET_GRBIT grbit;
  476. JET_TABLEID tableid; // returned tableid.
  477. unsigned long cCreated; // count of objects created (columns+table+indexes+callbacks).
  478. } JET_TABLECREATE2;
  479. typedef struct
  480. {
  481. unsigned long cbStruct;
  482. unsigned long ibLongValue;
  483. unsigned long itagSequence;
  484. JET_COLUMNID columnidNextTagged;
  485. } JET_RETINFO;
  486. typedef struct
  487. {
  488. unsigned long cbStruct;
  489. unsigned long ibLongValue;
  490. unsigned long itagSequence;
  491. } JET_SETINFO;
  492. typedef struct
  493. {
  494. unsigned long cbStruct;
  495. unsigned long centriesLT;
  496. unsigned long centriesInRange;
  497. unsigned long centriesTotal;
  498. } JET_RECPOS;
  499. typedef struct
  500. {
  501. unsigned long cbStruct;
  502. JET_TABLEID tableid;
  503. unsigned long cRecord;
  504. JET_COLUMNID columnidBookmark;
  505. } JET_RECORDLIST;
  506. typedef struct
  507. {
  508. unsigned long cbStruct;
  509. JET_TABLEID tableid;
  510. JET_GRBIT grbit;
  511. } JET_INDEXRANGE;
  512. // for database DDL conversion
  513. typedef enum
  514. {
  515. opDDLConvNull,
  516. opDDLConvAddCallback,
  517. opDDLConvChangeColumn,
  518. opDDLConvAddConditionalColumnsToAllIndexes,
  519. opDDLConvAddColumnCallback,
  520. opDDLConvMax
  521. } JET_OPDDLCONV;
  522. typedef struct tagDDLADDCALLBACK
  523. {
  524. char *szTable;
  525. char *szCallback;
  526. JET_CBTYP cbtyp;
  527. } JET_DDLADDCALLBACK;
  528. typedef struct tagDDLCHANGECOLUMN
  529. {
  530. char *szTable;
  531. char *szColumn;
  532. JET_COLTYP coltypNew;
  533. JET_GRBIT grbitNew;
  534. } JET_DDLCHANGECOLUMN;
  535. typedef struct tagDDLADDCONDITIONALCOLUMNSTOALLINDEXES
  536. {
  537. char * szTable; // name of table to convert
  538. JET_CONDITIONALCOLUMN * rgconditionalcolumn; // pointer to conditional column structure
  539. unsigned long cConditionalColumn; // number of conditional columns
  540. } JET_DDLADDCONDITIONALCOLUMNSTOALLINDEXES;
  541. typedef struct tagDDLADDCOLUMCALLBACK
  542. {
  543. char *szTable;
  544. char *szColumn;
  545. char *szCallback;
  546. void *pvCallbackData;
  547. unsigned long cbCallbackData;
  548. } JET_DDLADDCOLUMNCALLBACK;
  549. // The caller need to setup JET_OLP with a signal wait for the signal to be set.
  550. typedef struct {
  551. void *pvReserved1; // internally use
  552. void *pvReserved2;
  553. unsigned long cbActual; // the actual number of bytes read through this IO
  554. JET_HANDLE hSig; // a manual reset signal to wait for the IO to complete.
  555. JET_ERR err; // Err code for this assync IO.
  556. } JET_OLP;
  557. #include <pshpack1.h>
  558. #define JET_MAX_COMPUTERNAME_LENGTH 15
  559. typedef struct {
  560. char bSeconds; // 0 - 60
  561. char bMinutes; // 0 - 60
  562. char bHours; // 0 - 24
  563. char bDay; // 1 - 31
  564. char bMonth; // 0 - 11
  565. char bYear; // current year - 1900
  566. char bFiller1;
  567. char bFiller2;
  568. } JET_LOGTIME;
  569. typedef struct
  570. {
  571. unsigned short ib; // must be the last so that lgpos can
  572. unsigned short isec; // index of disksec starting logsec
  573. long lGeneration; // generation of logsec
  574. } JET_LGPOS; // be casted to TIME.
  575. typedef struct
  576. {
  577. unsigned long ulRandom; // a random number
  578. JET_LOGTIME logtimeCreate; // time db created, in logtime format
  579. char szComputerName[ JET_MAX_COMPUTERNAME_LENGTH + 1 ]; // where db is created
  580. } JET_SIGNATURE;
  581. typedef struct
  582. {
  583. JET_LGPOS lgposMark; // id for this backup
  584. JET_LOGTIME logtimeMark;
  585. unsigned long genLow;
  586. unsigned long genHigh;
  587. } JET_BKINFO;
  588. #include <poppack.h>
  589. typedef struct {
  590. unsigned long ulVersion; // version of DAE the db created (see ulDAEVersion)
  591. unsigned long ulUpdate; // used to track incremental database format updates that
  592. // are backward-compatible (see ulDAEUpdate)
  593. JET_SIGNATURE signDb; // (28 bytes) signature of the db (incl. creation time).
  594. unsigned long dbstate; // consistent/inconsistent state
  595. JET_LGPOS lgposConsistent; // null if in inconsistent state
  596. JET_LOGTIME logtimeConsistent; // null if in inconsistent state
  597. JET_LOGTIME logtimeAttach; // Last attach time.
  598. JET_LGPOS lgposAttach;
  599. JET_LOGTIME logtimeDetach; // Last detach time.
  600. JET_LGPOS lgposDetach;
  601. JET_SIGNATURE signLog; // (28 bytes) log signature for this attachments
  602. JET_BKINFO bkinfoFullPrev; // Last successful full backup.
  603. JET_BKINFO bkinfoIncPrev; // Last successful Incremental backup.
  604. // Reset when bkinfoFullPrev is set
  605. JET_BKINFO bkinfoFullCur; // current backup. Succeed if a
  606. // corresponding pat file generated.
  607. unsigned long fShadowingDisabled;
  608. unsigned long fUpgradeDb;
  609. // NT version information. This is needed to decide if an index need
  610. // be recreated due to sort table changes.
  611. unsigned long dwMajorVersion; /* OS version info */
  612. unsigned long dwMinorVersion;
  613. unsigned long dwBuildNumber;
  614. long lSPNumber;
  615. unsigned long cbPageSize; // database page size (0 = 4k pages)
  616. } JET_DBINFOMISC;
  617. typedef struct {
  618. unsigned long cpageOwned; // number of owned pages in the streaming file
  619. unsigned long cpageAvail; // number of available pages in the streaming file (subset of cpageOwned)
  620. } JET_STREAMINGFILESPACEINFO;
  621. //typedef struct
  622. // {
  623. // unsigned long cDiscont;
  624. // unsigned long cUnfixedMessyPage;
  625. // unsigned long centriesLT;
  626. // unsigned long centriesTotal;
  627. // unsigned long cpgCompactFreed;
  628. // } JET_OLCSTAT;
  629. /************************************************************************/
  630. /************************* JET CONSTANTS ************************/
  631. /************************************************************************/
  632. #define JET_tableidNil (~(JET_TABLEID)0)
  633. #define JET_sesidNil (~(JET_SESID)0)
  634. #define JET_instanceNil (~(JET_INSTANCE)0)
  635. /* Max size of a bookmark */
  636. #define JET_cbBookmarkMost 256
  637. /* Max length of a object/column/index/property name */
  638. #define JET_cbNameMost 64
  639. /* Max length of a "name.name.name..." construct */
  640. #define JET_cbFullNameMost 255
  641. /* Max size of long-value (LongBinary or LongText) column chunk */
  642. // #define JET_cbColumnLVChunkMost ( JET_cbPage - 82 ) to the following:
  643. // Get cbPage from GetSystemParameter.
  644. // changed JET_cbColumnLVChunkMOst reference to cbPage - JET_cbColumnLVPageOverhead
  645. #define JET_cbColumnLVPageOverhead 82
  646. #define JET_cbColumnLVChunkMost ( 4096 - 82 ) // This def will be removed after other components change not to use this def
  647. #define JET_cbColumnLVChunkMost_OLD 4035
  648. /* Max size of long-value (LongBinary or LongText) column default value */
  649. #define JET_cbLVDefaultValueMost 255
  650. /* Max size of non-long-value column data */
  651. #define JET_cbColumnMost 255
  652. /* Max size of a sort/index key */
  653. #define JET_cbKeyMost 255
  654. #define JET_cbLimitKeyMost 256 // maximum key size when key is formed using a Limit grbit (eg. JET_bitStrLimit)
  655. #define JET_cbPrimaryKeyMost 255
  656. #define JET_cbSecondaryKeyMost 255
  657. #define JET_cbKeyMost_OLD 255
  658. /* Max number of components in a sort/index key */
  659. #define JET_ccolKeyMost 12
  660. // maximum number of columns
  661. #define JET_ccolMost 0x0000fee0
  662. #define JET_ccolFixedMost 0x0000007f
  663. #define JET_ccolVarMost 0x00000080
  664. #define JET_ccolTaggedMost ( JET_ccolMost - 0x000000ff )
  665. // event logging level (only on and off for now - will add more in the future)
  666. #define JET_EventLoggingDisable 0
  667. #define JET_EventLoggingLevelMax 100
  668. // system paramters
  669. //
  670. // location parameters
  671. //
  672. #define JET_paramSystemPath 0 /* path to check point file [".\\"] */
  673. #define JET_paramTempPath 1 /* path to the temporary database [".\\"] */
  674. #define JET_paramLogFilePath 2 /* path to the log file directory [".\\"] */
  675. #define JET_paramLogFileFailoverPath 61 /* path to use if the log file disk should fail [none] */
  676. #define JET_paramCreatePathIfNotExist 100 /* create system/temp/log/log-failover paths if they do not exist */
  677. #define JET_paramBaseName 3 /* base name for all DBMS object names ["edb"] */
  678. #define JET_paramEventSource 4 /* language independent process descriptor string [""] */
  679. // performance parameters
  680. //
  681. #define JET_paramMaxSessions 5 /* maximum number of sessions [16] */
  682. #define JET_paramMaxOpenTables 6 /* maximum number of open directories [300]
  683. /* need 1 for each open table index,
  684. /* plus 1 for each open table with no indexes,
  685. /* plus 1 for each table with long column data,
  686. /* plus a few more.
  687. /**/
  688. /* for 4.1, 1/3 for regular table, 2/3 for index */
  689. #define JET_paramPreferredMaxOpenTables 7 /* preferred maximum number of open directories [300] */
  690. #define JET_paramMaxCursors 8 /* maximum number of open cursors [1024] */
  691. #define JET_paramMaxVerPages 9 /* maximum version store size in 16kByte units [64] */
  692. #define JET_paramGlobalMinVerPages 81 /* minimum version store size for all instances in 16kByte units [64] */
  693. #define JET_paramPreferredVerPages 63 /* preferred version store size in 16kByte units [64 * 0.9] */
  694. #define JET_paramMaxTemporaryTables 10 /* maximum concurrent open temporary table/index creation [20] */
  695. #define JET_paramLogFileSize 11 /* log file size in kBytes [5120] */
  696. #define JET_paramLogBuffers 12 /* log buffers in 512 bytes [80] */
  697. #define JET_paramWaitLogFlush 13 /* log flush wait time in milliseconds [0] DEFUNCT */
  698. #define JET_paramLogCheckpointPeriod 14 /* checkpoint period in 512 bytes [1024] DEFUNCT */
  699. #define JET_paramLogWaitingUserMax 15 /* maximum sessions waiting log flush [3] DEFUNCT */
  700. #define JET_paramCommitDefault 16 /* default grbit for JetCommitTransaction [0] */
  701. #define JET_paramCircularLog 17 /* boolean flag for circular logging [0] */
  702. #define JET_paramDbExtensionSize 18 /* database extension size in pages [256] DEFUNCT */
  703. #define JET_paramPageTempDBMin 19 /* minimum size temporary database in pages [0] DEFUNCT */
  704. #define JET_paramPageFragment 20 /* maximum disk extent considered fragment in pages [8] DEFUNCT */
  705. #define JET_paramPageReadAheadMax 21 /* maximum read-ahead in pages [20] DEFUNCT */
  706. #define JET_paramPageHintCacheSize 101 /* maximum size of the fast page latch hint cache in bytes [256kb] */
  707. #define JET_paramOneDatabasePerSession 102 /* allow just one open user database per session [false] */
  708. // cache performance parameters
  709. //
  710. #define JET_paramBatchIOBufferMax 22 /* maximum batch I/O buffers in pages [64] DEFUNCT */
  711. #define JET_paramCacheSizeMin 60 /* minimum cache size in pages [64] */
  712. #define JET_paramCacheSize 41 /* current cache size in pages [512] */
  713. #define JET_paramCacheSizeMax 23 /* maximum cache size in pages [512] */
  714. #define JET_paramCheckpointDepthMax 24 /* maximum checkpoint depth in bytes [20MB] */
  715. #define JET_paramLRUKCorrInterval 25 /* time (usec) under which page accesses are correlated [128000], it was 10000 */
  716. #define JET_paramLRUKHistoryMax 26 /* maximum LRUK history records [1024] (proportional to cache size max) DEFUNCT */
  717. #define JET_paramLRUKPolicy 27 /* K-ness of LRUK page eviction algorithm (1...2) [2] */
  718. #define JET_paramLRUKTimeout 28 /* time (sec) after which cached pages are always evictable [100] */
  719. #define JET_paramLRUKTrxCorrInterval 29 /* Not Used: time (usec) under which page accesses by the same transaction are correlated [5000000] DEFUNCT */
  720. #define JET_paramOutstandingIOMax 30 /* maximum outstanding I/Os [64] DEFUNCT */
  721. #define JET_paramStartFlushThreshold 31 /* evictable pages at which to start a flush [100] (proportional to CacheSizeMax) */
  722. #define JET_paramStopFlushThreshold 32 /* evictable pages at which to stop a flush [400] (proportional to CacheSizeMax) */
  723. #define JET_paramTableClassName 33 /* table stats class name (class #, string) */
  724. // Backup performance parameters
  725. //
  726. #define JET_paramBackupChunkSize 66 /* backup read size in pages [16] */
  727. #define JET_paramBackupOutstandingReads 67 /* backup maximum reads outstanding [8] */
  728. //
  729. //
  730. #define JET_paramExceptionAction 98 /* what to do with exceptions generated within JET */
  731. #define JET_paramEventLogCache 99 /* number of bytes of eventlog records to cache if service is not available [0] */
  732. // debug only parameters
  733. //
  734. #define JET_paramRecovery 34 /* enable recovery [-1] */
  735. #define JET_paramOnLineCompact 35 /* enable online defrag [TRUE by default] */
  736. #define JET_paramEnableOnlineDefrag 35 /* enable online defrag [TRUE by default] */
  737. #define JET_paramAssertAction 36 /* action on assert */
  738. #define JET_paramPrintFunction 37 /* synched print function [NULL] */
  739. #define JET_paramTransactionLevel 38 /* transaction level of session */
  740. #define JET_paramRFS2IOsPermitted 39 /* #IOs permitted to succeed [-1 = all] */
  741. #define JET_paramRFS2AllocsPermitted 40 /* #allocs permitted to success [-1 = all] */
  742. #define JET_paramCacheRequests 42 /* #cache requests (Read Only) */
  743. #define JET_paramCacheHits 43 /* #cache hits (Read Only) */
  744. // Application specific parameter
  745. // Used by NT only.
  746. #define JET_paramCheckFormatWhenOpenFail 44 /* JetInit may return JET_errDatabaseXXXformat instead of database corrupt when it is set */
  747. #define JET_paramEnableIndexChecking 45 /* Enable checking OS version for indexes (FALSE by default) */
  748. #define JET_paramEnableTempTableVersioning 46 /* Enable versioning of temp tables (TRUE by default) */
  749. #define JET_paramIgnoreLogVersion 47 /* Do not check the log version */
  750. #define JET_paramDeleteOldLogs 48 /* Delete the log files if the version is old, after deleting may make database non-recoverable */
  751. #define JET_paramEventSourceKey 49 /* Event source registration key value */
  752. #define JET_paramNoInformationEvent 50 /* Disable logging information event [ FALSE by default ] */
  753. #define JET_paramEventLoggingLevel 51 /* Set the type of information that goes to event log [ eventLoggingLevelMax by default ] */
  754. #define JET_paramSysDbPath_OLD 0 /* path to the system database (defunct) ["<base name>.<base ext>"] */
  755. #define JET_paramSystemPath_OLD 0 /* path to check point file ["."] */
  756. #define JET_paramTempPath_OLD 1 /* path to the temporary database ["."] */
  757. #define JET_paramMaxBuffers_OLD 8 /* maximum page cache size in pages [512] */
  758. #define JET_paramMaxSessions_OLD 9 /* maximum number of sessions [128] */
  759. #define JET_paramMaxOpenTables_OLD 10 /* maximum number of open tables [300] */
  760. #define JET_paramPreferredMaxOpenTables_OLD 59 /* prefered maximum number of open tables [300] */
  761. #define JET_paramMaxVerPages_OLD 11 /* maximum version store size in 16KB buckets [64] */
  762. #define JET_paramMaxCursors_OLD 12 /* maximum number of open cursors [1024] */
  763. #define JET_paramLogFilePath_OLD 13 /* path to the log file directory ["."] */
  764. #define JET_paramMaxOpenTableIndexes_OLD 14 /* maximum open table indexes [300] */
  765. #define JET_paramMaxTemporaryTables_OLD 15 /* maximum concurrent JetCreateIndex [20] */
  766. #define JET_paramLogBuffers_OLD 16 /* maximum log buffers in 512 bytes [21] */
  767. #define JET_paramLogFileSize_OLD 17 /* maximum log file size in kBytes [5120] */
  768. #define JET_paramBfThrshldLowPrcnt_OLD 19 /* low percentage clean buffer flush start [20] */
  769. #define JET_paramBfThrshldHighPrcnt_OLD 20 /* high percentage clean buffer flush stop [80] */
  770. #define JET_paramWaitLogFlush_OLD 21 /* log flush wait time in milliseconds [15] */
  771. #define JET_paramLogCheckpointPeriod_OLD 23 /* checkpoint period in 512 bytes [1024] */
  772. #define JET_paramLogWaitingUserMax_OLD 24 /* maximum sessions waiting log flush [3] */
  773. #define JET_paramRecovery_OLD 30 /* Switch for log on/off */
  774. #define JET_paramSessionInfo_OLD 33 /* per session information [0] */
  775. #define JET_paramPageFragment_OLD 34 /* maximum disk extent considered fragment in pages [8] */
  776. #define JET_paramMaxOpenDatabases_OLD 36 /* maximum number of open databases [100] */
  777. #define JET_paramBufBatchIOMax_OLD 41 /* maximum batch IO in pages [64] */
  778. #define JET_paramPageReadAheadMax_OLD 42 /* maximum read-ahead IO in pages [20] */
  779. #define JET_paramAsynchIOMax_OLD 43 /* maximum asynchronous IO in pages [64] */
  780. #define JET_paramEventSource_OLD 45 /* language independant process descriptor string [""] */
  781. #define JET_paramDbExtensionSize_OLD 48 /* database extension size in pages [16] */
  782. #define JET_paramCommitDefault_OLD 50 /* default grbit for JetCommitTransaction [0] */
  783. #define JET_paramBufLogGenAgeThreshold_OLD 51 /* age threshold in log files [2] */
  784. #define JET_paramCircularLog_OLD 52 /* boolean flag for circular logging [0] */
  785. #define JET_paramPageTempDBMin_OLD 53 /* minimum size temporary database in pages [0] */
  786. #define JET_paramBaseName_OLD 56 /* base name for all DBMS object names ["edb"] */
  787. #define JET_paramBaseExtension_OLD 57 /* base extension for all DBMS object names ["edb"] */
  788. #define JET_paramTableClassName_OLD 58 /* table stats class name (class #, string) */
  789. #define JET_paramEnableImprovedSeekShortcut 62 /* check to see if we are seeking for the record we are currently on [false] */
  790. #define JET_paramDatabasePageSize 64 /* set database page size */
  791. #define JET_paramDisableCallbacks 65 /* turn off callback resolution (for defrag/repair) */
  792. #define JET_paramSLVProviderEnable 68 /* Enable SLV Provider [0] */
  793. #define JET_paramErrorToString 70 /* turns a JET_err into a string (taken from the comment in jet.h) */
  794. #define JET_paramZeroDatabaseDuringBackup 71 /* Overwrite deleted records/LVs during backup [false] */
  795. #define JET_paramUnicodeIndexDefault 72 /* default LCMapString() lcid and flags to use for CreateIndex() and unique multi-values check */
  796. /* (pass JET_UNICODEINDEX structure for lParam) */
  797. #define JET_paramRuntimeCallback 73 /* pointer to runtime-only callback function */
  798. #define JET_paramSLVDefragFreeThreshold 74 /* chunks whose free % is > this will be allocated from */
  799. #define JET_paramSLVDefragMoveThreshold 75 /* chunks whose free % is > this will be relocated */
  800. #define JET_paramEnableSortedRetrieveColumns 76 /* internally sort (in a dynamically allocated parallel array) JET_RETRIEVECOLUMN structures passed to JetRetrieveColumns() */
  801. #define JET_paramCleanupMismatchedLogFiles 77 /* instead of erroring out after a successful recovery with JET_errLogFileSizeMismatchDatabasesConsistent, ESE will silently delete the old log files and checkpoint file and continue operations */
  802. #define JET_paramRecordUpgradeDirtyLevel 78 /* how aggresively should pages with their record format converted be flushed (0-3) [1] */
  803. #define JET_paramRecoveryCurrentLogfile 79 /* which generation is currently being replayed (JetGetSystemParameter only) */
  804. #define JET_paramReplayingReplicatedLogfiles 80 /* if a logfile doesn't exist, wait for it to be created */
  805. #define JET_paramOSSnapshotTimeout 82 /* timeout for the freeze period in msec [1000 * 20] */
  806. #define JET_paramSFSEnable 200 /* enable the simple-file-system (SFS) which will manage all ESE files in a single volume (OS file) */
  807. #define JET_paramSFSVolume 201 /* name/path of the SFS volume file */
  808. /* Flags for JetInit2 */
  809. #define JET_bitReplayReplicatedLogFiles 0x00000001
  810. #define JET_bitCreateSFSVolumeIfNotExist 0x00000002
  811. // IGNORE_MISSING_ATTACH, ignoring hanging asserts for missing databases during recovery
  812. #define JET_bitReplayIgnoreMissingDB 0x00000004 /* ignore missing databases */
  813. /* Flags for JetTerm2 */
  814. #define JET_bitTermComplete 0x00000001
  815. #define JET_bitTermAbrupt 0x00000002
  816. #define JET_bitTermStopBackup 0x00000004
  817. /* Flags for JetIdle */
  818. #define JET_bitIdleFlushBuffers 0x00000001
  819. #define JET_bitIdleCompact 0x00000002
  820. #define JET_bitIdleStatus 0x00000004
  821. #define JET_bitIdleVersionStoreTest 0x00000008 /* INTERNAL USE ONLY. call version store consistency check */
  822. /* Flags for JetEndSession */
  823. #define JET_bitForceSessionClosed 0x00000001
  824. /* Flags for JetAttach/OpenDatabase */
  825. #define JET_bitDbReadOnly 0x00000001
  826. #define JET_bitDbExclusive 0x00000002 /* multiple opens allowed */
  827. #define JET_bitDbSingleExclusive 0x00000008 /* opened exactly once */
  828. #define JET_bitDbDeleteCorruptIndexes 0x00000010 /* delete indexes possibly corrupted by NT version upgrade */
  829. #define JET_bitDbRebuildCorruptIndexes 0x00000020 /* NOT CURRENTLY IMPLEMENTED - recreate indexes possibly corrupted by NT version upgrade */
  830. #define JET_bitDbUpgrade 0x00000200 /* */
  831. /* Flags for JetDetachDatabase2 */
  832. #define JET_bitForceDetach 0x00000001
  833. #define JET_bitForceCloseAndDetach (0x00000002 | JET_bitForceDetach)
  834. /* Flags for JetCreateDatabase */
  835. #define JET_bitDbRecoveryOff 0x00000008 /* disable logging/recovery for this database */
  836. #define JET_bitDbVersioningOff 0x00000040 /* INTERNAL USE ONLY */
  837. #define JET_bitDbShadowingOff 0x00000080 /* disable catalog shadowing */
  838. #define JET_bitDbCreateStreamingFile 0x00000100 /* create streaming file with same name as db */
  839. /* Flags for JetBackup */
  840. #define JET_bitBackupIncremental 0x00000001
  841. #define JET_bitKeepOldLogs 0x00000002
  842. #define JET_bitBackupAtomic 0x00000004
  843. #define JET_bitBackupFullWithAllLogs 0x00000008
  844. #define JET_bitBackupSnapshot 0x00000010
  845. /* Database types */
  846. #define JET_dbidNil ((JET_DBID) 0xFFFFFFFF)
  847. #define JET_dbidNoValid ((JET_DBID) 0xFFFFFFFE) /* used as a flag to indicate that there is no valid dbid */
  848. /* Flags for JetCreateTableColumnIndex */
  849. #define JET_bitTableCreateFixedDDL 0x00000001 /* DDL is fixed */
  850. #define JET_bitTableCreateTemplateTable 0x00000002 /* DDL is inheritable (implies FixedDDL) */
  851. #define JET_bitTableCreateNoFixedVarColumnsInDerivedTables 0x00000004
  852. // used in conjunction with JET_bitTableCreateTemplateTable
  853. // to disallow fixed/var columns in derived tables (so that
  854. // fixed/var columns may be added to the template in the future)
  855. #define JET_bitTableCreateSystemTable 0x80000000 /* INTERNAL USE ONLY */
  856. /* Flags for JetAddColumn, JetGetColumnInfo, JetOpenTempTable */
  857. #define JET_bitColumnFixed 0x00000001
  858. #define JET_bitColumnTagged 0x00000002
  859. #define JET_bitColumnNotNULL 0x00000004
  860. #define JET_bitColumnVersion 0x00000008
  861. #define JET_bitColumnAutoincrement 0x00000010
  862. #define JET_bitColumnUpdatable 0x00000020 /* JetGetColumnInfo only */
  863. #define JET_bitColumnTTKey 0x00000040 /* JetOpenTempTable only */
  864. #define JET_bitColumnTTDescending 0x00000080 /* JetOpenTempTable only */
  865. #define JET_bitColumnMultiValued 0x00000400
  866. #define JET_bitColumnEscrowUpdate 0x00000800 /* escrow updated */
  867. #define JET_bitColumnUnversioned 0x00001000 /* for add column only - add column unversioned */
  868. #define JET_bitColumnMaybeNull 0x00002000 /* for retrieve column info of outer join where no match from the inner table */
  869. #define JET_bitColumnFinalize 0x00004000 /* this is a finalizable column */
  870. #define JET_bitColumnUserDefinedDefault 0x00008000 /* default value from a user-provided callback */
  871. #define JET_bitColumnRenameConvertToPrimaryIndexPlaceholder 0x00010000 // FOR JetRenameColumn() ONLY: rename and convert to primary index placeholder (ie. no longer part of primary index ecxept as a placeholder)
  872. // flags for JetDeleteColumn
  873. #define JET_bitDeleteColumnIgnoreTemplateColumns 0x00000001 // for derived tables, don't bother looking in template columns
  874. /* Flags for JetSetCurrentIndex */
  875. #define JET_bitMoveFirst 0x00000000
  876. #define JET_bitMoveBeforeFirst 0x00000001 // unsupported -- DO NOT USE
  877. #define JET_bitNoMove 0x00000002
  878. /* Flags for JetMakeKey */
  879. #define JET_bitNewKey 0x00000001
  880. #define JET_bitStrLimit 0x00000002
  881. #define JET_bitSubStrLimit 0x00000004
  882. #define JET_bitNormalizedKey 0x00000008
  883. #define JET_bitKeyDataZeroLength 0x00000010
  884. #define JET_bitKeyOverridePrimaryIndexPlaceholder 0x00000020
  885. #define JET_maskLimitOptions 0x00000f00
  886. #define JET_bitFullColumnStartLimit 0x00000100
  887. #define JET_bitFullColumnEndLimit 0x00000200
  888. #define JET_bitPartialColumnStartLimit 0x00000400
  889. #define JET_bitPartialColumnEndLimit 0x00000800
  890. /* Flags for ErrDispSetIndexRange */
  891. #define JET_bitRangeInclusive 0x00000001
  892. #define JET_bitRangeUpperLimit 0x00000002
  893. #define JET_bitRangeInstantDuration 0x00000004
  894. #define JET_bitRangeRemove 0x00000008
  895. /* Flags for JetGetLock */
  896. #define JET_bitReadLock 0x00000001
  897. #define JET_bitWriteLock 0x00000002
  898. /* Constants for JetMove */
  899. #define JET_MoveFirst (0x80000000)
  900. #define JET_MovePrevious (-1)
  901. #define JET_MoveNext (+1)
  902. #define JET_MoveLast (0x7fffffff)
  903. /* Flags for JetMove */
  904. #define JET_bitMoveKeyNE 0x00000001
  905. /* Flags for JetSeek */
  906. #define JET_bitSeekEQ 0x00000001
  907. #define JET_bitSeekLT 0x00000002
  908. #define JET_bitSeekLE 0x00000004
  909. #define JET_bitSeekGE 0x00000008
  910. #define JET_bitSeekGT 0x00000010
  911. #define JET_bitSetIndexRange 0x00000020
  912. /* Flags for JET_CONDITIONALCOLUMN */
  913. #define JET_bitIndexColumnMustBeNull 0x00000001
  914. #define JET_bitIndexColumnMustBeNonNull 0x00000002
  915. /* Flags for JET_INDEXRANGE */
  916. #define JET_bitRecordInIndex 0x00000001
  917. #define JET_bitRecordNotInIndex 0x00000002
  918. /* Flags for JetCreateIndex */
  919. #define JET_bitIndexUnique 0x00000001
  920. #define JET_bitIndexPrimary 0x00000002
  921. #define JET_bitIndexDisallowNull 0x00000004
  922. #define JET_bitIndexIgnoreNull 0x00000008
  923. #define JET_bitIndexClustered40 0x00000010 /* for backward compatibility */
  924. #define JET_bitIndexIgnoreAnyNull 0x00000020
  925. #define JET_bitIndexIgnoreFirstNull 0x00000040
  926. #define JET_bitIndexLazyFlush 0x00000080
  927. #define JET_bitIndexEmpty 0x00000100 // don't attempt to build index, because all entries would evaluate to NULL (MUST also specify JET_bitIgnoreAnyNull)
  928. #define JET_bitIndexUnversioned 0x00000200
  929. #define JET_bitIndexSortNullsHigh 0x00000400 // NULL sorts after data for all columns in the index
  930. #define JET_bitIndexUnicode 0x00000800 // LCID field of JET_INDEXCREATE actually points to a JET_UNICODEINDEX struct to allow user-defined LCMapString() flags
  931. // UNDONE: Remove the following:
  932. // #define JET_bitIndexClustered JET_bitIndexPrimary primary index is the clustered index
  933. // #define JET_bitIndexEmptyTable 0x40000000
  934. /* Flags for index key definition */
  935. #define JET_bitKeyAscending 0x00000000
  936. #define JET_bitKeyDescending 0x00000001
  937. /* Flags for JetOpenTable */
  938. #define JET_bitTableDenyWrite 0x00000001
  939. #define JET_bitTableDenyRead 0x00000002
  940. #define JET_bitTableReadOnly 0x00000004
  941. #define JET_bitTableUpdatable 0x00000008
  942. #define JET_bitTablePermitDDL 0x00000010 /* override table flagged as FixedDDL (must be used with DenyRead) */
  943. #define JET_bitTableNoCache 0x00000020 /* don't cache the pages for this table */
  944. #define JET_bitTablePreread 0x00000040 /* assume the table is probably not in the buffer cache */
  945. #define JET_bitTableDelete 0x10000000 /* INTERNAL USE ONLY */
  946. #define JET_bitTableCreate 0x20000000 /* INTERNAL USE ONLY */
  947. #define JET_bitTableClassMask 0x000F0000 /* table stats class mask */
  948. #define JET_bitTableClassNone 0x00000000 /* table belongs to no stats class (default) */
  949. #define JET_bitTableClass1 0x00010000 /* table belongs to stats class 1 */
  950. #define JET_bitTableClass2 0x00020000 /* table belongs to stats class 2 */
  951. #define JET_bitTableClass3 0x00030000 /* table belongs to stats class 3 */
  952. #define JET_bitTableClass4 0x00040000 /* table belongs to stats class 4 */
  953. #define JET_bitTableClass5 0x00050000 /* table belongs to stats class 5 */
  954. #define JET_bitTableClass6 0x00060000 /* table belongs to stats class 6 */
  955. #define JET_bitTableClass7 0x00070000 /* table belongs to stats class 7 */
  956. #define JET_bitTableClass8 0x00080000 /* table belongs to stats class 8 */
  957. #define JET_bitTableClass9 0x00090000 /* table belongs to stats class 9 */
  958. #define JET_bitTableClass10 0x000A0000 /* table belongs to stats class 10 */
  959. #define JET_bitTableClass11 0x000B0000 /* table belongs to stats class 11 */
  960. #define JET_bitTableClass12 0x000C0000 /* table belongs to stats class 12 */
  961. #define JET_bitTableClass13 0x000D0000 /* table belongs to stats class 13 */
  962. #define JET_bitTableClass14 0x000E0000 /* table belongs to stats class 14 */
  963. #define JET_bitTableClass15 0x000F0000 /* table belongs to stats class 15 */
  964. #define JET_bitLSReset 0x00000001 /* reset LS value */
  965. #define JET_bitLSCursor 0x00000002 /* set/retrieve LS of table cursor */
  966. #define JET_bitLSTable 0x00000004 /* set/retrieve LS of table */
  967. #define JET_LSNil (~(JET_LS)0)
  968. /* Flags for JetOpenTempTable and ErrIsamOpenTempTable */
  969. #define JET_bitTTIndexed 0x00000001 /* Allow seek */
  970. #define JET_bitTTUnique 0x00000002 /* Remove duplicates */
  971. #define JET_bitTTUpdatable 0x00000004 /* Allow updates */
  972. #define JET_bitTTScrollable 0x00000008 /* Allow backwards scrolling */
  973. #define JET_bitTTSortNullsHigh 0x00000010 /* NULL sorts after data for all columns in the index */
  974. #define JET_bitTTForceMaterialization 0x00000020 /* Forces temp. table to be materialized into a btree (allows for duplicate detection) */
  975. #define JET_bitTTErrorOnDuplicateInsertion JET_bitTTForceMaterialization /* Error always returned when duplicate is inserted (instead of dupe being silently removed) */
  976. /* Flags for JetSetColumn */
  977. #define JET_bitSetAppendLV 0x00000001
  978. #define JET_bitSetOverwriteLV 0x00000004 /* overwrite JET_coltypLong* byte range */
  979. #define JET_bitSetSizeLV 0x00000008 /* set JET_coltypLong* size */
  980. #define JET_bitSetZeroLength 0x00000020
  981. #define JET_bitSetSeparateLV 0x00000040 /* force LV separation */
  982. #define JET_bitSetUniqueMultiValues 0x00000080 /* prevent duplicate multi-values */
  983. #define JET_bitSetUniqueNormalizedMultiValues 0x00000100 /* prevent duplicate multi-values, normalizing all data before performing comparisons */
  984. #define JET_bitSetRevertToDefaultValue 0x00000200 /* if setting last tagged instance to NULL, revert to default value instead if one exists */
  985. #define JET_bitSetIntrinsicLV 0x00000400 /* store whole LV in record without bursting or return an error */
  986. #define JET_bitSetSLVDataNotRecoverable 0x00001000 /* SLV data is not recoverable */
  987. #define JET_bitSetSLVFromSLVInfo 0x00002000 /* internal use only */
  988. /* Flags for JetSetColumn when the SLV Provider is enabled */
  989. #define JET_bitSetSLVFromSLVFile 0x00004000 /* set SLV from an SLV File handle */
  990. #define JET_bitSetSLVFromSLVEA 0x00008000 /* set SLV from an SLV EA list */
  991. /* Set column parameter structure for JetSetColumns */
  992. typedef struct {
  993. JET_COLUMNID columnid;
  994. const void *pvData;
  995. unsigned long cbData;
  996. JET_GRBIT grbit;
  997. unsigned long ibLongValue;
  998. unsigned long itagSequence;
  999. JET_ERR err;
  1000. } JET_SETCOLUMN;
  1001. typedef struct {
  1002. unsigned long paramid;
  1003. ULONG_PTR lParam;
  1004. const char *sz;
  1005. JET_ERR err;
  1006. } JET_SETSYSPARAM;
  1007. /* Options for JetPrepareUpdate */
  1008. #define JET_prepInsert 0
  1009. #define JET_prepReplace 2
  1010. #define JET_prepCancel 3
  1011. #define JET_prepReplaceNoLock 4
  1012. #define JET_prepInsertCopy 5
  1013. #define JET_prepInsertCopyWithoutSLVColumns 6 // same as InsertCopy, except that SLV columns are nullified instead of copied in the new record */
  1014. #define JET_prepInsertCopyDeleteOriginal 7 // used for updating a record in the primary key; avoids the delete/insert process */
  1015. #define JET_prepReadOnlyCopy 8 // copy record into copy buffer for read-only purposes
  1016. /* Flags for JetEscrowUpdate */
  1017. #define JET_bitEscrowNoRollback 0x0001
  1018. /* Flags for JetRetrieveColumn */
  1019. #define JET_bitRetrieveCopy 0x00000001
  1020. #define JET_bitRetrieveFromIndex 0x00000002
  1021. #define JET_bitRetrieveFromPrimaryBookmark 0x00000004
  1022. #define JET_bitRetrieveTag 0x00000008
  1023. #define JET_bitRetrieveNull 0x00000010 /* for columnid 0 only */
  1024. #define JET_bitRetrieveIgnoreDefault 0x00000020 /* for columnid 0 only */
  1025. #define JET_bitRetrieveLongId 0x00000040
  1026. #define JET_bitRetrieveLongValueRefCount 0x00000080 /* for testing use only */
  1027. #define JET_bitRetrieveSLVAsSLVInfo 0x00000100 /* internal use only */
  1028. /* Flags for JetRetrieveColumn when the SLV Provider is enabled */
  1029. #define JET_bitRetrieveSLVAsSLVFile 0x00000200 /* retrieve SLV as an SLV File handle */
  1030. #define JET_bitRetrieveSLVAsSLVEA 0x00000400 /* retrieve SLV as an SLV EA list */
  1031. /* Retrieve column parameter structure for JetRetrieveColumns */
  1032. typedef struct {
  1033. JET_COLUMNID columnid;
  1034. void *pvData;
  1035. unsigned long cbData;
  1036. unsigned long cbActual;
  1037. JET_GRBIT grbit;
  1038. unsigned long ibLongValue;
  1039. unsigned long itagSequence;
  1040. JET_COLUMNID columnidNextTagged;
  1041. JET_ERR err;
  1042. } JET_RETRIEVECOLUMN;
  1043. typedef struct
  1044. {
  1045. JET_COLUMNID columnid;
  1046. unsigned short cMultiValues;
  1047. union
  1048. {
  1049. unsigned short usFlags;
  1050. struct
  1051. {
  1052. unsigned short fLongValue:1; // is column LongText/Binary?
  1053. unsigned short fDefaultValue:1; // was a default value retrieved?
  1054. unsigned short fNullOverride:1; // was there an explicit null to override a default value?
  1055. unsigned short fDerived:1; // was column derived from template table?
  1056. };
  1057. };
  1058. } JET_RETRIEVEMULTIVALUECOUNT;
  1059. /* Flags for JetBeginTransaction2 */
  1060. #define JET_bitTransactionReadOnly 0x00000001 /* transaction will not modify the database */
  1061. #define JET_bitDistributedTransaction 0x00000002 /* transaction will require two-phase commit */
  1062. /* Flags for JetCommitTransaction */
  1063. #define JET_bitCommitLazyFlush 0x00000001 /* lazy flush log buffers. */
  1064. #define JET_bitWaitLastLevel0Commit 0x00000002 /* wait for last level 0 commit record flushed */
  1065. #define JET_bitCommitFlush_OLD 0x00000001 /* commit and flush page buffers. */
  1066. #define JET_bitCommitLazyFlush_OLD 0x00000004 /* lazy flush log buffers. */
  1067. #define JET_bitWaitLastLevel0Commit_OLD 0x00000010 /* wait for last level 0 commit record flushed */
  1068. /* Flags for JetRollback */
  1069. #define JET_bitRollbackAll 0x00000001
  1070. /* Info parameter for JetGetDatabaseInfo */
  1071. #define JET_DbInfoFilename 0
  1072. #define JET_DbInfoConnect 1
  1073. #define JET_DbInfoCountry 2
  1074. #define JET_DbInfoLCID 3
  1075. #define JET_DbInfoLangid 3 // OBSOLETE: use JET_DbInfoLCID instead
  1076. #define JET_DbInfoCp 4
  1077. #define JET_DbInfoCollate 5
  1078. #define JET_DbInfoOptions 6
  1079. #define JET_DbInfoTransactions 7
  1080. #define JET_DbInfoVersion 8
  1081. #define JET_DbInfoIsam 9
  1082. #define JET_DbInfoFilesize 10
  1083. #define JET_DbInfoSpaceOwned 11
  1084. #define JET_DbInfoSpaceAvailable 12
  1085. #define JET_DbInfoUpgrade 13
  1086. #define JET_DbInfoMisc 14
  1087. #define JET_DbInfoDBInUse 15
  1088. #define JET_DbInfoHasSLVFile 16
  1089. #define JET_DbInfoStreamingFileSpace 17
  1090. /* Dbstates from JetGetDatabaseFileInfo */
  1091. #define JET_dbstateJustCreated 1
  1092. #define JET_dbstateInconsistent 2
  1093. #define JET_dbstateConsistent 3
  1094. #define JET_dbstateBeingConverted 4
  1095. #define JET_dbstateForceDetach 5
  1096. /* Column data types */
  1097. #define JET_coltypNil 0
  1098. #define JET_coltypBit 1 /* True or False, Never NULL */
  1099. #define JET_coltypUnsignedByte 2 /* 1-byte integer, unsigned */
  1100. #define JET_coltypShort 3 /* 2-byte integer, signed */
  1101. #define JET_coltypLong 4 /* 4-byte integer, signed */
  1102. #define JET_coltypCurrency 5 /* 8 byte integer, signed */
  1103. #define JET_coltypIEEESingle 6 /* 4-byte IEEE single precision */
  1104. #define JET_coltypIEEEDouble 7 /* 8-byte IEEE double precision */
  1105. #define JET_coltypDateTime 8 /* Integral date, fractional time */
  1106. #define JET_coltypBinary 9 /* Binary data, < 255 bytes */
  1107. #define JET_coltypText 10 /* ANSI text, case insensitive, < 255 bytes */
  1108. #define JET_coltypLongBinary 11 /* Binary data, long value */
  1109. #define JET_coltypLongText 12 /* ANSI text, long value */
  1110. #define JET_coltypSLV 13 /* SLV's */
  1111. #define JET_coltypMax 14 /* the number of column types */
  1112. /* used for validity tests and */
  1113. /* array declarations. */
  1114. /* Info levels for JetGetObjectInfo */
  1115. #define JET_ObjInfo 0U
  1116. #define JET_ObjInfoListNoStats 1U
  1117. #define JET_ObjInfoList 2U
  1118. #define JET_ObjInfoSysTabCursor 3U
  1119. #define JET_ObjInfoListACM 4U /* Blocked by JetGetObjectInfo */
  1120. #define JET_ObjInfoNoStats 5U
  1121. #define JET_ObjInfoSysTabReadOnly 6U
  1122. #define JET_ObjInfoRulesLoaded 7U
  1123. #define JET_ObjInfoMax 8U
  1124. /* Info levels for JetGetTableInfo */
  1125. #define JET_TblInfo 0U
  1126. #define JET_TblInfoName 1U
  1127. #define JET_TblInfoDbid 2U
  1128. #define JET_TblInfoMostMany 3U
  1129. #define JET_TblInfoRvt 4U
  1130. #define JET_TblInfoOLC 5U
  1131. #define JET_TblInfoResetOLC 6U
  1132. #define JET_TblInfoSpaceUsage 7U
  1133. #define JET_TblInfoDumpTable 8U
  1134. #define JET_TblInfoSpaceAlloc 9U
  1135. #define JET_TblInfoSpaceOwned 10U // OwnExt
  1136. #define JET_TblInfoSpaceAvailable 11U // AvailExt
  1137. #define JET_TblInfoTemplateTableName 12U
  1138. /* Info levels for JetGetIndexInfo and JetGetTableIndexInfo */
  1139. #define JET_IdxInfo 0U
  1140. #define JET_IdxInfoList 1U
  1141. #define JET_IdxInfoSysTabCursor 2U
  1142. #define JET_IdxInfoOLC 3U
  1143. #define JET_IdxInfoResetOLC 4U
  1144. #define JET_IdxInfoSpaceAlloc 5U
  1145. #define JET_IdxInfoLCID 6U
  1146. #define JET_IdxInfoLangid 6U // OBSOLETE: use JET_IdxInfoLCID instead
  1147. #define JET_IdxInfoCount 7U
  1148. #define JET_IdxInfoVarSegMac 8U
  1149. #define JET_IdxInfoIndexId 9U
  1150. /* Info levels for JetGetColumnInfo and JetGetTableColumnInfo */
  1151. #define JET_ColInfo 0U
  1152. #define JET_ColInfoList 1U
  1153. #define JET_ColInfoSysTabCursor 3U
  1154. #define JET_ColInfoBase 4U
  1155. #define JET_ColInfoListCompact 5U
  1156. #define JET_ColInfoByColid 6U
  1157. #define JET_ColInfoListSortColumnid 7U // same as JET_ColInfoList except PresentationOrder is set to columnid
  1158. // to force sorting by columnid
  1159. /* Engine Object Types */
  1160. #define JET_objtypNil 0
  1161. #define JET_objtypTable 1
  1162. #define JET_objtypDb 2
  1163. #define JET_objtypContainer 3
  1164. #define JET_objtypLongRoot 9 /* INTERNAL USE ONLY */
  1165. /* Compact Options */
  1166. #define JET_bitCompactStats 0x00000020 /* Dump off-line compaction stats (only when progress meter also specified) */
  1167. #define JET_bitCompactRepair 0x00000040 /* Don't preread and ignore duplicate keys */
  1168. #define JET_bitCompactSLVCopy 0x00000080 /* Recreate SLV file, do not reuse the existing one */
  1169. /* Status Notification Processes */
  1170. #define JET_snpRepair 2
  1171. #define JET_snpCompact 4
  1172. #define JET_snpRestore 8
  1173. #define JET_snpBackup 9
  1174. #define JET_snpUpgrade 10
  1175. #define JET_snpScrub 11
  1176. #define JET_snpUpgradeRecordFormat 12
  1177. /* Status Notification Types */
  1178. #define JET_sntBegin 5 /* callback for beginning of operation */
  1179. #define JET_sntRequirements 7 /* callback for returning operation requirements */
  1180. #define JET_sntProgress 0 /* callback for progress */
  1181. #define JET_sntComplete 6 /* callback for completion of operation */
  1182. #define JET_sntFail 3 /* callback for failure during progress */
  1183. /* Exception action */
  1184. #define JET_ExceptionMsgBox 0x0001 /* Display message box on exception */
  1185. #define JET_ExceptionNone 0x0002 /* Do nothing on exceptions */
  1186. /* AssertAction */
  1187. #define JET_AssertExit 0x0000 /* Exit the application */
  1188. #define JET_AssertBreak 0x0001 /* Break to debugger */
  1189. #define JET_AssertMsgBox 0x0002 /* Display message box */
  1190. #define JET_AssertStop 0x0004 /* Alert and stop */
  1191. /* Counter flags */ // For XJET only, not for JET97
  1192. #define ctAccessPage 1
  1193. #define ctLatchConflict 2
  1194. #define ctSplitRetry 3
  1195. #define ctNeighborPageScanned 4
  1196. #define ctSplits 5
  1197. /**********************************************************************/
  1198. /*********************** ERROR CODES **************************/
  1199. /**********************************************************************/
  1200. /* SUCCESS */
  1201. #define JET_errSuccess 0 /* Successful Operation */
  1202. /* ERRORS */
  1203. #define JET_wrnNyi -1 /* Function Not Yet Implemented */
  1204. /* SYSTEM errors
  1205. /**/
  1206. #define JET_errRfsFailure -100 /* Resource Failure Simulator failure */
  1207. #define JET_errRfsNotArmed -101 /* Resource Failure Simulator not initialized */
  1208. #define JET_errFileClose -102 /* Could not close file */
  1209. #define JET_errOutOfThreads -103 /* Could not start thread */
  1210. #define JET_errTooManyIO -105 /* System busy due to too many IOs */
  1211. #define JET_errTaskDropped -106 /* A requested async task could not be executed */
  1212. #define JET_errInternalError -107 /* Fatal internal error */
  1213. // BUFFER MANAGER errors
  1214. //
  1215. #define wrnBFCacheMiss 200 /* ese97,esent only: page latch caused a cache miss */
  1216. #define errBFPageNotCached -201 /* page is not cached */
  1217. #define errBFLatchConflict -202 /* page latch conflict */
  1218. #define errBFPageCached -203 /* page is cached */
  1219. #define wrnBFPageFlushPending 204 /* page is currently being written */
  1220. #define wrnBFPageFault 205 /* page latch caused a page fault */
  1221. #define errBFIPageEvicted -250 /* ese97,esent only: page evicted from the cache */
  1222. #define errBFIPageCached -251 /* ese97,esent only: page already cached */
  1223. #define errBFIOutOfOLPs -252 /* ese97,esent only: out of OLPs */
  1224. #define errBFIOutOfBatchIOBuffers -253 /* ese97,esent only: out of Batch I/O Buffers */
  1225. #define errBFINoBufferAvailable -254 /* no buffer available for immediate use */
  1226. #define JET_errDatabaseBufferDependenciesCorrupted -255 /* Buffer dependencies improperly set. Recovery failure */
  1227. #define errBFIRemainingDependencies -256 /* dependencies remain on this buffer */
  1228. #define errBFIPageFlushPending -257 /* page is currently being written */
  1229. #define errBFIPageNotEvicted -258 /* the page could not be evicted from the cache */
  1230. #define errBFIPageFlushed -259 /* page write initiated */
  1231. #define errBFIPageFaultPending -260 /* page is currently being read */
  1232. #define errBFIPageNotVerified -261 /* page data has not been verified */
  1233. #define errBFIDependentPurged -262 /* page cannot be flushed due to purged dependencies */
  1234. // VERSION STORE errors
  1235. //
  1236. #define wrnVERRCEMoved 275 /* RCE was moved instead of being cleaned */
  1237. /* DIRECTORY MANAGER errors
  1238. /**/
  1239. #define errPMOutOfPageSpace -300 /* Out of page space */
  1240. #define errPMItagTooBig -301 /* Itag too big */ // XXX -- to be deleted
  1241. #define errPMRecDeleted -302 /* Record deleted */ // XXX -- to be deleted
  1242. #define errPMTagsUsedUp -303 /* Tags used up */ // XXX -- to be deleted
  1243. #define wrnBMConflict 304 /* conflict in BM Clean up */
  1244. #define errDIRNoShortCircuit -305 /* No Short Circuit Avail */
  1245. #define errDIRCannotSplit -306 /* Cannot horizontally split FDP */
  1246. #define errDIRTop -307 /* Cannot go up */
  1247. #define errDIRFDP 308 /* On an FDP Node */
  1248. #define errDIRNotSynchronous -309 /* May have left critical section */
  1249. #define wrnDIREmptyPage 310 /* Moved through empty page */
  1250. #define errSPConflict -311 /* Device extent being extended */
  1251. #define wrnNDFoundLess 312 /* Found Less */
  1252. #define wrnNDFoundGreater 313 /* Found Greater */
  1253. #define wrnNDNotFoundInPage 314 /* for smart refresh */
  1254. #define errNDNotFound -312 /* Not found */
  1255. #define errNDOutSonRange -314 /* Son out of range */
  1256. #define errNDOutItemRange -315 /* Item out of range */
  1257. #define errNDGreaterThanAllItems -316 /* Greater than all items */
  1258. #define errNDLastItemNode -317 /* Last node of item list */
  1259. #define errNDFirstItemNode -318 /* First node of item list */
  1260. #define wrnNDDuplicateItem 319 /* Duplicated Item */
  1261. #define errNDNoItem -320 /* Item not there */
  1262. #define JET_wrnRemainingVersions 321 /* The version store is still active */
  1263. #define JET_errPreviousVersion -322 /* Version already existed. Recovery failure */
  1264. #define JET_errPageBoundary -323 /* Reached Page Boundary */
  1265. #define JET_errKeyBoundary -324 /* Reached Key Boundary */
  1266. #define errDIRInPageFather -325 /* sridFather in page to free */
  1267. #define errBMMaxKeyInPage -326 /* used by OLC to avoid cleanup of parent pages */
  1268. #define JET_errBadPageLink -327 /* Database corrupted */
  1269. #define JET_errBadBookmark -328 /* Bookmark has no corresponding address in database */
  1270. #define wrnBMCleanNullOp 329 // BMClean returns this on encountering a page
  1271. // deleted MaxKeyInPage [but there was no conflict]
  1272. #define errBTOperNone -330 // Split with no accompanying
  1273. // insert/replace
  1274. #define errSPOutOfAvailExtCacheSpace -331 // unable to make update to AvailExt tree since
  1275. // in-cursor space cache is depleted
  1276. #define errSPOutOfOwnExtCacheSpace -332 // unable to make update to OwnExt tree since
  1277. // in-cursor space cache is depleted
  1278. #define wrnBTMultipageOLC 333 // needs multipage OLC operation
  1279. #define JET_errNTSystemCallFailed -334 /* A call to the operating system failed */
  1280. #define wrnBTShallowTree 335 // BTree is only one or two levels deeps
  1281. #define errBTMergeNotSynchronous -336 // Multiple threads attempting to perform merge/split on same page (likely OLD vs. RCEClean)
  1282. #define wrnSPReservedPages 337 // space manager reserved pages for future space tree splits
  1283. #define JET_errBadParentPageLink -338 /* Database corrupted */
  1284. #define wrnSPBuildAvailExtCache 339 // AvailExt tree is sufficiently large that it should be cached
  1285. #define JET_errSPAvailExtCacheOutOfSync -340 // AvailExt cache doesn't match btree
  1286. #define JET_errSPAvailExtCorrupted -341 // AvailExt space tree is corrupt
  1287. #define JET_errSPAvailExtCacheOutOfMemory -342 // Out of memory allocating an AvailExt cache node
  1288. #define JET_errSPOwnExtCorrupted -343 // OwnExt space tree is corrupt
  1289. #define JET_errDbTimeCorrupted -344 // Dbtime on current page is greater than global database dbtime
  1290. /* RECORD MANAGER errors
  1291. /**/
  1292. #define wrnFLDKeyTooBig 400 /* Key too big (truncated it) */
  1293. #define errFLDTooManySegments -401 /* Too many key segments */
  1294. #define wrnFLDNullKey 402 /* Key is entirely NULL */
  1295. #define wrnFLDOutOfKeys 403 /* No more keys to extract */
  1296. #define wrnFLDNullSeg 404 /* Null segment in key */
  1297. #define wrnFLDNotPresentInIndex 405
  1298. #define JET_wrnSeparateLongValue 406 /* Column is a separated long-value */
  1299. #define wrnRECLongField 407 /* Long value */
  1300. #define JET_wrnRecordFoundGreater JET_wrnSeekNotEqual
  1301. #define JET_wrnRecordFoundLess JET_wrnSeekNotEqual
  1302. #define JET_errColumnIllegalNull JET_errNullInvalid
  1303. #define wrnFLDNullFirstSeg 408 /* Null first segment in key */
  1304. #define JET_errKeyTooBig -408 /* Key is too large */
  1305. #define wrnRECUserDefinedDefault 409 /* User-defined default value */
  1306. #define wrnRECSeparatedLV 410 /* LV stored in LV tree */
  1307. #define wrnRECIntrinsicLV 411 /* LV stored in the record */
  1308. #define wrnRECSeparatedSLV 412 /* SLV stored as a separated LV */
  1309. #define wrnRECIntrinsicSLV 413 /* SLV stored as an intrinsic LV */
  1310. /* LOGGING/RECOVERY errors
  1311. /**/
  1312. #define JET_errInvalidLoggedOperation -500 /* Logged operation cannot be redone */
  1313. #define JET_errLogFileCorrupt -501 /* Log file is corrupt */
  1314. #define errLGNoMoreRecords -502 /* Last log record read */
  1315. #define JET_errNoBackupDirectory -503 /* No backup directory given */
  1316. #define JET_errBackupDirectoryNotEmpty -504 /* The backup directory is not emtpy */
  1317. #define JET_errBackupInProgress -505 /* Backup is active already */
  1318. #define JET_errRestoreInProgress -506 /* Restore in progress */
  1319. #define JET_errMissingPreviousLogFile -509 /* Missing the log file for check point */
  1320. #define JET_errLogWriteFail -510 /* Failure writing to log file */
  1321. #define JET_errLogDisabledDueToRecoveryFailure -511 /* Try to log something after recovery faild */
  1322. #define JET_errCannotLogDuringRecoveryRedo -512 /* Try to log something during recovery redo */
  1323. #define JET_errBadLogVersion -514 /* Version of log file is not compatible with Jet version */
  1324. #define JET_errInvalidLogSequence -515 /* Timestamp in next log does not match expected */
  1325. #define JET_errLoggingDisabled -516 /* Log is not active */
  1326. #define JET_errLogBufferTooSmall -517 /* Log buffer is too small for recovery */
  1327. #define errLGNotSynchronous -518 /* retry to LGLogRec */
  1328. #define JET_errLogSequenceEnd -519 /* Maximum log file number exceeded */
  1329. #define JET_errNoBackup -520 /* No backup in progress */
  1330. #define JET_errInvalidBackupSequence -521 /* Backup call out of sequence */
  1331. #define JET_errBackupNotAllowedYet -523 /* Cannot do backup now */
  1332. #define JET_errDeleteBackupFileFail -524 /* Could not delete backup file */
  1333. #define JET_errMakeBackupDirectoryFail -525 /* Could not make backup temp directory */
  1334. #define JET_errInvalidBackup -526 /* Cannot perform incremental backup when circular logging enabled */
  1335. #define JET_errRecoveredWithErrors -527 /* Restored with errors */
  1336. #define JET_errMissingLogFile -528 /* Current log file missing */
  1337. #define JET_errLogDiskFull -529 /* Log disk full */
  1338. #define JET_errBadLogSignature -530 /* Bad signature for a log file */
  1339. #define JET_errBadDbSignature -531 /* Bad signature for a db file */
  1340. #define JET_errBadCheckpointSignature -532 /* Bad signature for a checkpoint file */
  1341. #define JET_errCheckpointCorrupt -533 /* Checkpoint file not found or corrupt */
  1342. #define JET_errMissingPatchPage -534 /* Patch file page not found during recovery */
  1343. #define JET_errBadPatchPage -535 /* Patch file page is not valid */
  1344. #define JET_errRedoAbruptEnded -536 /* Redo abruptly ended due to sudden failure in reading logs from log file */
  1345. #define JET_errBadSLVSignature -537 /* Signature in SLV file does not agree with database */
  1346. #define JET_errPatchFileMissing -538 /* Hard restore detected that patch file is missing from backup set */
  1347. #define JET_errDatabaseLogSetMismatch -539 /* Database does not belong with the current set of log files */
  1348. #define JET_errDatabaseStreamingFileMismatch -540 /* Database and streaming file do not match each other */
  1349. #define JET_errLogFileSizeMismatch -541 /* actual log file size does not match JET_paramLogFileSize */
  1350. #define JET_errCheckpointFileNotFound -542 /* Could not locate checkpoint file */
  1351. #define JET_errRequiredLogFilesMissing -543 /* The required log files for recovery is missing. */
  1352. #define JET_errSoftRecoveryOnBackupDatabase -544 /* Soft recovery is intended on a backup database. Restore should be used instead */
  1353. #define JET_errLogFileSizeMismatchDatabasesConsistent -545 /* databases have been recovered, but the log file size used during recovery does not match JET_paramLogFileSize */
  1354. #define JET_errLogSectorSizeMismatch -546 /* the log file sector size does not match the current volume's sector size */
  1355. #define JET_errLogSectorSizeMismatchDatabasesConsistent -547 /* databases have been recovered, but the log file sector size (used during recovery) does not match the current volume's sector size */
  1356. #define JET_errLogSequenceEndDatabasesConsistent -548 /* databases have been recovered, but all possible log generations in the current sequence are used; delete all log files and the checkpoint file and backup the databases before continuing */
  1357. #define JET_errStreamingDataNotLogged -549 /* Illegal attempt to replay a streaming file operation where the data wasn't logged. Probably caused by an attempt to roll-forward with circular logging enabled */
  1358. #define JET_errDatabaseInconsistent -550 /* Database is in inconsistent state */
  1359. #define JET_errConsistentTimeMismatch -551 /* Database last consistent time unmatched */
  1360. #define JET_errDatabasePatchFileMismatch -552 /* Patch file is not generated from this backup */
  1361. #define JET_errEndingRestoreLogTooLow -553 /* The starting log number too low for the restore */
  1362. #define JET_errStartingRestoreLogTooHigh -554 /* The starting log number too high for the restore */
  1363. #define JET_errGivenLogFileHasBadSignature -555 /* Restore log file has bad signature */
  1364. #define JET_errGivenLogFileIsNotContiguous -556 /* Restore log file is not contiguous */
  1365. #define JET_errMissingRestoreLogFiles -557 /* Some restore log files are missing */
  1366. #define JET_wrnExistingLogFileHasBadSignature 558 /* Existing log file has bad signature */
  1367. #define JET_wrnExistingLogFileIsNotContiguous 559 /* Existing log file is not contiguous */
  1368. #define JET_errMissingFullBackup -560 /* The database miss a previous full backup befor incremental backup */
  1369. #define JET_errBadBackupDatabaseSize -561 /* The backup database size is not in 4k */
  1370. #define JET_errDatabaseAlreadyUpgraded -562 /* Attempted to upgrade a database that is already current */
  1371. #define JET_errDatabaseIncompleteUpgrade -563 /* Attempted to use a database which was only partially converted to the current format -- must restore from backup */
  1372. #define JET_wrnSkipThisRecord 564 /* INTERNAL ERROR */
  1373. #define JET_errMissingCurrentLogFiles -565 /* Some current log files are missing for continous restore */
  1374. #define JET_errDbTimeTooOld -566 /* dbtime on page smaller than dbtimeBefore in record */
  1375. #define JET_errDbTimeTooNew -567 /* dbtime on page in advence of the dbtimeBefore in record */
  1376. #define wrnCleanedUpMismatchedFiles 568 /* INTERNAL WARNING: indicates that the redo function cleaned up logs/checkpoint because of a size mismatch (see JET_paramCleanupMismatchedLogFiles) */
  1377. #define JET_errMissingFileToBackup -569 /* Some log or patch files are missing during backup */
  1378. #define JET_errLogTornWriteDuringHardRestore -570 /* torn-write was detected in a backup set during hard restore */
  1379. #define JET_errLogTornWriteDuringHardRecovery -571 /* torn-write was detected during hard recovery (log was not part of a backup set) */
  1380. #define JET_errLogCorruptDuringHardRestore -573 /* corruption was detected in a backup set during hard restore */
  1381. #define JET_errLogCorruptDuringHardRecovery -574 /* corruption was detected during hard recovery (log was not part of a backup set) */
  1382. #define JET_errMustDisableLoggingForDbUpgrade -575 /* Cannot have logging enabled while attempting to upgrade db */
  1383. #define errLGRecordDataInaccessible -576 /* an incomplete log record was created because all the data to be logged was not accessible */
  1384. #define JET_errBadRestoreTargetInstance -577 /* TargetInstance specified for restore is not found or log files don't match */
  1385. #define JET_wrnTargetInstanceRunning 578 /* TargetInstance specified for restore is running */
  1386. #define JET_errDatabasesNotFromSameSnapshot -580 /* Databases to be restored are not from the same Snapshot backup */
  1387. #define JET_errSoftRecoveryOnSnapshot -581 /* Soft recovery on a database from a snapshot backup set */
  1388. #define JET_errUnicodeTranslationBufferTooSmall -601 /* Unicode translation buffer too small */
  1389. #define JET_errUnicodeTranslationFail -602 /* Unicode normalization failed */
  1390. #define JET_errExistingLogFileHasBadSignature -610 /* Existing log file has bad signature */
  1391. #define JET_errExistingLogFileIsNotContiguous -611 /* Existing log file is not contiguous */
  1392. #define JET_errLogReadVerifyFailure -612 /* Checksum error in log file during backup */
  1393. #define JET_errSLVReadVerifyFailure -613 /* Checksum error in SLV file during backup */
  1394. #define errBackupAbortByCaller -800 /* INTERNAL ERROR: Backup was aborted by client or RPC connection with client failed */
  1395. #define JET_errBackupAbortByServer -801 /* Backup was aborted by server by calling JetTerm with JET_bitTermStopBackup */
  1396. #define JET_errInvalidGrbit -900 /* Invalid parameter */
  1397. #define JET_errTermInProgress -1000 /* Termination in progress */
  1398. #define JET_errFeatureNotAvailable -1001 /* API not supported */
  1399. #define JET_errInvalidName -1002 /* Invalid name */
  1400. #define JET_errInvalidParameter -1003 /* Invalid API parameter */
  1401. #define JET_wrnColumnNull 1004 /* Column is NULL-valued */
  1402. #define JET_wrnBufferTruncated 1006 /* Buffer too small for data */
  1403. #define JET_wrnDatabaseAttached 1007 /* Database is already attached */
  1404. #define JET_errDatabaseFileReadOnly -1008 /* Tried to attach a read-only database file for read/write operations */
  1405. #define JET_wrnSortOverflow 1009 /* Sort does not fit in memory */
  1406. #define JET_errInvalidDatabaseId -1010 /* Invalid database id */
  1407. #define JET_errOutOfMemory -1011 /* Out of Memory */
  1408. #define JET_errOutOfDatabaseSpace -1012 /* Maximum database size reached */
  1409. #define JET_errOutOfCursors -1013 /* Out of table cursors */
  1410. #define JET_errOutOfBuffers -1014 /* Out of database page buffers */
  1411. #define JET_errTooManyIndexes -1015 /* Too many indexes */
  1412. #define JET_errTooManyKeys -1016 /* Too many columns in an index */
  1413. #define JET_errRecordDeleted -1017 /* Record has been deleted */
  1414. #define JET_errReadVerifyFailure -1018 /* Checksum error on a database page */
  1415. #define JET_errPageNotInitialized -1019 /* Blank database page */
  1416. #define JET_errOutOfFileHandles -1020 /* Out of file handles */
  1417. #define JET_errDiskIO -1022 /* Disk IO error */
  1418. #define JET_errInvalidPath -1023 /* Invalid file path */
  1419. #define JET_errInvalidSystemPath -1024 /* Invalid system path */
  1420. #define JET_errInvalidLogDirectory -1025 /* Invalid log directory */
  1421. #define JET_errRecordTooBig -1026 /* Record larger than maximum size */
  1422. #define JET_errTooManyOpenDatabases -1027 /* Too many open databases */
  1423. #define JET_errInvalidDatabase -1028 /* Not a database file */
  1424. #define JET_errNotInitialized -1029 /* Database engine not initialized */
  1425. #define JET_errAlreadyInitialized -1030 /* Database engine already initialized */
  1426. #define JET_errInitInProgress -1031 /* Database engine is being initialized */
  1427. #define JET_errFileAccessDenied -1032 /* Cannot access file, the file is locked or in use */
  1428. #define JET_errQueryNotSupported -1034 /* Query support unavailable */ // XXX -- to be deleted
  1429. #define JET_errSQLLinkNotSupported -1035 /* SQL Link support unavailable */ // XXX -- to be deleted
  1430. #define JET_errBufferTooSmall -1038 /* Buffer is too small */
  1431. #define JET_wrnSeekNotEqual 1039 /* Exact match not found during seek */
  1432. #define JET_errTooManyColumns -1040 /* Too many columns defined */
  1433. #define JET_errContainerNotEmpty -1043 /* Container is not empty */
  1434. #define JET_errInvalidFilename -1044 /* Filename is invalid */
  1435. #define JET_errInvalidBookmark -1045 /* Invalid bookmark */
  1436. #define JET_errColumnInUse -1046 /* Column used in an index */
  1437. #define JET_errInvalidBufferSize -1047 /* Data buffer doesn't match column size */
  1438. #define JET_errColumnNotUpdatable -1048 /* Cannot set column value */
  1439. #define JET_errIndexInUse -1051 /* Index is in use */
  1440. #define JET_errLinkNotSupported -1052 /* Link support unavailable */
  1441. #define JET_errNullKeyDisallowed -1053 /* Null keys are disallowed on index */
  1442. #define JET_errNotInTransaction -1054 /* Operation must be within a transaction */
  1443. #define JET_wrnNoErrorInfo 1055 /* No extended error information */
  1444. #define JET_wrnNoIdleActivity 1058 /* No idle activity occured */
  1445. #define JET_errTooManyActiveUsers -1059 /* Too many active database users */
  1446. #define JET_errInvalidCountry -1061 /* Invalid or unknown country code */
  1447. #define JET_errInvalidLanguageId -1062 /* Invalid or unknown language id */
  1448. #define JET_errInvalidCodePage -1063 /* Invalid or unknown code page */
  1449. #define JET_wrnNoWriteLock 1067 /* No write lock at transaction level 0 */
  1450. #define JET_wrnColumnSetNull 1068 /* Column set to NULL-value */
  1451. #define JET_errVersionStoreOutOfMemory -1069 /* Version store out of memory */
  1452. #define JET_errCurrencyStackOutOfMemory -1070 /* UNUSED: lCSRPerfFUCB * g_lCursorsMax exceeded (XJET only) */
  1453. #define JET_errCannotIndex -1071 /* Cannot index escrow column or SLV column */
  1454. #define JET_errRecordNotDeleted -1072 /* Record has not been deleted */
  1455. #define JET_errTooManyMempoolEntries -1073 /* Too many mempool entries requested */
  1456. #define JET_errOutOfObjectIDs -1074 /* Out of btree ObjectIDs (perform offline defrag to reclaim freed/unused ObjectIds) */
  1457. #define JET_errRunningInOneInstanceMode -1080 /* Multi-instance call with single-instance mode enabled */
  1458. #define JET_errRunningInMultiInstanceMode -1081 /* Single-instance call with multi-instance mode enabled */
  1459. #define JET_errSystemParamsAlreadySet -1082 /* Global system parameters have already been set */
  1460. #define JET_errSystemPathInUse -1083 /* System path already used by another database instance */
  1461. #define JET_errLogFilePathInUse -1084 /* Logfile path already used by another database instance */
  1462. #define JET_errTempPathInUse -1085 /* Temp path already used by another database instance */
  1463. #define JET_errInstanceNameInUse -1086 /* Instance Name already in use */
  1464. #define JET_errInstanceUnavailable -1090 /* This instance cannot be used because it encountered a fatal error */
  1465. #define JET_errDatabaseUnavailable -1091 /* This database cannot be used because it encountered a fatal error */
  1466. #define JET_errOutOfSessions -1101 /* Out of sessions */
  1467. #define JET_errWriteConflict -1102 /* Write lock failed due to outstanding write lock */
  1468. #define JET_errTransTooDeep -1103 /* Transactions nested too deeply */
  1469. #define JET_errInvalidSesid -1104 /* Invalid session handle */
  1470. #define JET_errWriteConflictPrimaryIndex -1105 /* Update attempted on uncommitted primary index */
  1471. #define JET_errInTransaction -1108 /* Operation not allowed within a transaction */
  1472. #define JET_errRollbackRequired -1109 /* Must rollback current transaction -- cannot commit or begin a new one */
  1473. #define JET_errTransReadOnly -1110 /* Read-only transaction tried to modify the database */
  1474. #define JET_errSessionWriteConflict -1111 /* Attempt to replace the same record by two diffrerent cursors in the same session */
  1475. #define JET_errMustCommitDistributedTransactionToLevel0 -1150 /* Attempted to PrepareToCommit a distributed transaction to non-zero level */
  1476. #define JET_errDistributedTransactionAlreadyPreparedToCommit -1151 /* Attempted a write-operation after a distributed transaction has called PrepareToCommit */
  1477. #define JET_errNotInDistributedTransaction -1152 /* Attempted to PrepareToCommit a non-distributed transaction */
  1478. #define JET_errDistributedTransactionNotYetPreparedToCommit -1153 /* Attempted to commit a distributed transaction, but PrepareToCommit has not yet been called */
  1479. #define JET_errCannotNestDistributedTransactions -1154 /* Attempted to begin a distributed transaction when not at level 0 */
  1480. #define JET_errDTCMissingCallback -1160 /* Attempted to begin a distributed transaction but no callback for DTC coordination was specified on initialisation */
  1481. #define JET_errDTCMissingCallbackOnRecovery -1161 /* Attempted to recover a distributed transaction but no callback for DTC coordination was specified on initialisation */
  1482. #define JET_errDTCCallbackUnexpectedError -1162 /* Unexpected error code returned from DTC callback */
  1483. #define JET_wrnDTCCommitTransaction 1163 /* Warning code DTC callback should return if the specified transaction is to be committed */
  1484. #define JET_wrnDTCRollbackTransaction 1164 /* Warning code DTC callback should return if the specified transaction is to be rolled back */
  1485. #define JET_errDatabaseDuplicate -1201 /* Database already exists */
  1486. #define JET_errDatabaseInUse -1202 /* Database in use */
  1487. #define JET_errDatabaseNotFound -1203 /* No such database */
  1488. #define JET_errDatabaseInvalidName -1204 /* Invalid database name */
  1489. #define JET_errDatabaseInvalidPages -1205 /* Invalid number of pages */
  1490. #define JET_errDatabaseCorrupted -1206 /* Non database file or corrupted db */
  1491. #define JET_errDatabaseLocked -1207 /* Database exclusively locked */
  1492. #define JET_errCannotDisableVersioning -1208 /* Cannot disable versioning for this database */
  1493. #define JET_errInvalidDatabaseVersion -1209 /* Database engine is incompatible with database */
  1494. /* The following error code are for NT clients only. It will return such error during
  1495. * JetInit if JET_paramCheckFormatWhenOpenFail is set.
  1496. */
  1497. #define JET_errDatabase200Format -1210 /* The database is in an older (200) format */
  1498. #define JET_errDatabase400Format -1211 /* The database is in an older (400) format */
  1499. #define JET_errDatabase500Format -1212 /* The database is in an older (500) format */
  1500. #define JET_errPageSizeMismatch -1213 /* The database page size does not match the engine */
  1501. #define JET_errTooManyInstances -1214 /* Cannot start any more database instances */
  1502. #define JET_errDatabaseSharingViolation -1215 /* A different database instance is using this database */
  1503. #define JET_errAttachedDatabaseMismatch -1216 /* An outstanding database attachment has been detected at the start or end of recovery, but database is missing or does not match attachment info */
  1504. #define JET_errDatabaseInvalidPath -1217 /* Specified path to database file is illegal */
  1505. #define JET_errDatabaseIdInUse -1218 /* A database is being assigned an id already in use */
  1506. #define JET_errForceDetachNotAllowed -1219 /* Force Detach allowed only after normal detach errored out */
  1507. #define JET_errCatalogCorrupted -1220 /* Corruption detected in catalog */
  1508. #define JET_errPartiallyAttachedDB -1221 /* Database is partially attached. Cannot complete attach operation */
  1509. #define JET_errDatabaseSignInUse -1222 /* Database with same signature in use */
  1510. #define errSkippedDbHeaderUpdate -1223 /* some db header weren't update becase there were during detach */
  1511. #define JET_wrnTableEmpty 1301 /* Opened an empty table */
  1512. #define JET_errTableLocked -1302 /* Table is exclusively locked */
  1513. #define JET_errTableDuplicate -1303 /* Table already exists */
  1514. #define JET_errTableInUse -1304 /* Table is in use, cannot lock */
  1515. #define JET_errObjectNotFound -1305 /* No such table or object */
  1516. #define JET_errDensityInvalid -1307 /* Bad file/index density */
  1517. #define JET_errTableNotEmpty -1308 /* Table is not empty */
  1518. #define JET_errInvalidTableId -1310 /* Invalid table id */
  1519. #define JET_errTooManyOpenTables -1311 /* Cannot open any more tables (cleanup already attempted) */
  1520. #define JET_errIllegalOperation -1312 /* Oper. not supported on table */
  1521. #define JET_errObjectDuplicate -1314 /* Table or object name in use */
  1522. #define JET_errInvalidObject -1316 /* Object is invalid for operation */
  1523. #define JET_errCannotDeleteTempTable -1317 /* Use CloseTable instead of DeleteTable to delete temp table */
  1524. #define JET_errCannotDeleteSystemTable -1318 /* Illegal attempt to delete a system table */
  1525. #define JET_errCannotDeleteTemplateTable -1319 /* Illegal attempt to delete a template table */
  1526. #define errFCBTooManyOpen -1320 /* Cannot open any more FCB's (cleanup not yet attempted) */
  1527. #define errFCBAboveThreshold -1321 /* Can only allocate FCB above preferred threshold (cleanup not yet attempted) */
  1528. #define JET_errExclusiveTableLockRequired -1322 /* Must have exclusive lock on table. */
  1529. #define JET_errFixedDDL -1323 /* DDL operations prohibited on this table */
  1530. #define JET_errFixedInheritedDDL -1324 /* On a derived table, DDL operations are prohibited on inherited portion of DDL */
  1531. #define JET_errCannotNestDDL -1325 /* Nesting of hierarchical DDL is not currently supported. */
  1532. #define JET_errDDLNotInheritable -1326 /* Tried to inherit DDL from a table not marked as a template table. */
  1533. #define JET_wrnTableInUseBySystem 1327 /* System cleanup has a cursor open on the table */
  1534. #define JET_errInvalidSettings -1328 /* System parameters were set improperly */
  1535. #define JET_errClientRequestToStopJetService -1329 /* Client has requested stop service */
  1536. #define JET_errCannotAddFixedVarColumnToDerivedTable -1330 /* Template table was created with NoFixedVarColumnsInDerivedTables */
  1537. #define errFCBExists -1331 /* Tried to create an FCB that already exists */
  1538. #define errFCBUnusable -1332 /* Placeholder to mark an FCB that must be purged as unusable */
  1539. #define wrnCATNoMoreRecords 1333 /* Attempted to navigate past the end of the catalog */
  1540. #define JET_errIndexCantBuild -1401 /* Index build failed */
  1541. #define JET_errIndexHasPrimary -1402 /* Primary index already defined */
  1542. #define JET_errIndexDuplicate -1403 /* Index is already defined */
  1543. #define JET_errIndexNotFound -1404 /* No such index */
  1544. #define JET_errIndexMustStay -1405 /* Cannot delete clustered index */
  1545. #define JET_errIndexInvalidDef -1406 /* Illegal index definition */
  1546. #define JET_errInvalidCreateIndex -1409 /* Invalid create index description */
  1547. #define JET_errTooManyOpenIndexes -1410 /* Out of index description blocks */
  1548. #define JET_errMultiValuedIndexViolation -1411 /* Non-unique inter-record index keys generated for a multivalued index */
  1549. #define JET_errIndexBuildCorrupted -1412 /* Failed to build a secondary index that properly reflects primary index */
  1550. #define JET_errPrimaryIndexCorrupted -1413 /* Primary index is corrupt. The database must be defragmented */
  1551. #define JET_errSecondaryIndexCorrupted -1414 /* Secondary index is corrupt. The database must be defragmented */
  1552. #define JET_wrnCorruptIndexDeleted 1415 /* Out of date index removed */
  1553. #define JET_errInvalidIndexId -1416 /* Illegal index id */
  1554. #define JET_errColumnLong -1501 /* Column value is long */
  1555. #define JET_errColumnNoChunk -1502 /* No such chunk in long value */
  1556. #define JET_errColumnDoesNotFit -1503 /* Field will not fit in record */
  1557. #define JET_errNullInvalid -1504 /* Null not valid */
  1558. #define JET_errColumnIndexed -1505 /* Column indexed, cannot delete */
  1559. #define JET_errColumnTooBig -1506 /* Field length is greater than maximum */
  1560. #define JET_errColumnNotFound -1507 /* No such column */
  1561. #define JET_errColumnDuplicate -1508 /* Field is already defined */
  1562. #define JET_errMultiValuedColumnMustBeTagged -1509 /* Attempted to create a multi-valued column, but column was not Tagged */
  1563. #define JET_errColumnRedundant -1510 /* Second autoincrement or version column */
  1564. #define JET_errInvalidColumnType -1511 /* Invalid column data type */
  1565. #define JET_wrnColumnMaxTruncated 1512 /* Max length too big, truncated */
  1566. #define JET_errTaggedNotNULL -1514 /* No non-NULL tagged columns */
  1567. #define JET_errNoCurrentIndex -1515 /* Invalid w/o a current index */
  1568. #define JET_errKeyIsMade -1516 /* The key is completely made */
  1569. #define JET_errBadColumnId -1517 /* Column Id Incorrect */
  1570. #define JET_errBadItagSequence -1518 /* Bad itagSequence for tagged column */
  1571. #define JET_errColumnInRelationship -1519 /* Cannot delete, column participates in relationship */
  1572. #define JET_wrnCopyLongValue 1520 /* Single instance column bursted */
  1573. #define JET_errCannotBeTagged -1521 /* AutoIncrement and Version cannot be tagged */
  1574. #define wrnLVNoLongValues 1522 /* Table does not have a long value tree */
  1575. #define JET_wrnTaggedColumnsRemaining 1523 /* RetrieveTaggedColumnList ran out of copy buffer before retrieving all tagged columns */
  1576. #define JET_errDefaultValueTooBig -1524 /* Default value exceeds maximum size */
  1577. #define JET_errMultiValuedDuplicate -1525 /* Duplicate detected on a unique multi-valued column */
  1578. #define JET_errLVCorrupted -1526 /* Corruption encountered in long-value tree */
  1579. #define wrnLVNoMoreData 1527 /* Reached end of LV data */
  1580. #define JET_errMultiValuedDuplicateAfterTruncation -1528 /* Duplicate detected on a unique multi-valued column after data was normalized, and normalizing truncated the data before comparison */
  1581. #define JET_errDerivedColumnCorruption -1529 /* Invalid column in derived table */
  1582. #define JET_errInvalidPlaceholderColumn -1530 /* Tried to convert column to a primary index placeholder, but column doesn't meet necessary criteria */
  1583. #define JET_errRecordNotFound -1601 /* The key was not found */
  1584. #define JET_errRecordNoCopy -1602 /* No working buffer */
  1585. #define JET_errNoCurrentRecord -1603 /* Currency not on a record */
  1586. #define JET_errRecordPrimaryChanged -1604 /* Primary key may not change */
  1587. #define JET_errKeyDuplicate -1605 /* Illegal duplicate key */
  1588. #define JET_errAlreadyPrepared -1607 /* Attempted to update record when record update was already in progress */
  1589. #define JET_errKeyNotMade -1608 /* No call to JetMakeKey */
  1590. #define JET_errUpdateNotPrepared -1609 /* No call to JetPrepareUpdate */
  1591. #define JET_wrnDataHasChanged 1610 /* Data has changed */
  1592. #define JET_errDataHasChanged -1611 /* Data has changed, operation aborted */
  1593. #define JET_wrnKeyChanged 1618 /* Moved to new key */
  1594. #define JET_errLanguageNotSupported -1619 /* WindowsNT installation does not support language */
  1595. #define JET_errTooManySorts -1701 /* Too many sort processes */
  1596. #define JET_errInvalidOnSort -1702 /* Invalid operation on Sort */
  1597. #define JET_errTempFileOpenError -1803 /* Temp file could not be opened */
  1598. #define JET_errTooManyAttachedDatabases -1805 /* Too many open databases */
  1599. #define JET_errDiskFull -1808 /* No space left on disk */
  1600. #define JET_errPermissionDenied -1809 /* Permission denied */
  1601. #define JET_errFileNotFound -1811 /* File not found */
  1602. #define JET_wrnFileOpenReadOnly 1813 /* Database file is read only */
  1603. #define JET_errAfterInitialization -1850 /* Cannot Restore after init. */
  1604. #define JET_errLogCorrupted -1852 /* Logs could not be interpreted */
  1605. #define JET_errInvalidOperation -1906 /* Invalid operation */
  1606. #define JET_errAccessDenied -1907 /* Access denied */
  1607. #define JET_wrnIdleFull 1908 /* Idle registry full */
  1608. #define JET_errTooManySplits -1909 /* Infinite split */
  1609. #define JET_errSessionSharingViolation -1910 /* Multiple threads are using the same session */
  1610. #define JET_errEntryPointNotFound -1911 /* An entry point in a DLL we require could not be found */
  1611. #define JET_errSessionContextAlreadySet -1912 /* Specified session already has a session context set */
  1612. #define JET_errSessionContextNotSetByThisThread -1913 /* Tried to reset session context, but current thread did not orignally set the session context */
  1613. #define JET_errSessionInUse -1914 /* Tried to terminate session in use */
  1614. #define JET_errRecordFormatConversionFailed -1915 /* Internal error during dynamic record format conversion */
  1615. #define JET_errOneDatabasePerSession -1916 /* Just one open user database per session is allowed (JET_paramOneDatabasePerSession) */
  1616. #define JET_errRollbackError -1917 /* error during rollback */
  1617. #define JET_wrnDefragAlreadyRunning 2000 /* Online defrag already running on specified database */
  1618. #define JET_wrnDefragNotRunning 2001 /* Online defrag not running on specified database */
  1619. #define JET_wrnCallbackNotRegistered 2100 /* Unregistered a non-existant callback function */
  1620. #define JET_errCallbackFailed -2101 /* A callback failed */
  1621. #define JET_errCallbackNotResolved -2102 /* A callback function could not be found */
  1622. #define wrnSLVNoStreamingData 2200 /* Database does not have a streaming file */
  1623. #define JET_errSLVSpaceCorrupted -2201 /* Corruption encountered in space manager of streaming file */
  1624. #define JET_errSLVCorrupted -2202 /* Corruption encountered in streaming file */
  1625. #define JET_errSLVColumnDefaultValueNotAllowed -2203 /* SLV columns cannot have a default value */
  1626. #define JET_errSLVStreamingFileMissing -2204 /* Cannot find streaming file associated with this database */
  1627. #define JET_errSLVDatabaseMissing -2205 /* Streaming file exists, but database to which it belongs is missing */
  1628. #define JET_errSLVStreamingFileAlreadyExists -2206 /* Tried to create a streaming file when one already exists or is already recorded in the catalog */
  1629. #define JET_errSLVInvalidPath -2207 /* Specified path to a streaming file is invalid */
  1630. #define JET_errSLVStreamingFileNotCreated -2208 /* Tried to perform an SLV operation but streaming file was never created */
  1631. #define JET_errSLVStreamingFileReadOnly -2209 /* Attach a readonly streaming file for read/write operations */
  1632. #define JET_errSLVHeaderBadChecksum -2210 /* SLV file header failed checksum verification */
  1633. #define JET_errSLVHeaderCorrupted -2211 /* SLV file header contains invalid information */
  1634. #define wrnSLVNoFreePages 2212 /* No free pages in SLV space tree */
  1635. #define JET_errSLVPagesNotFree -2213 /* Tried to move pages from the Free state when they were not in that state */
  1636. #define JET_errSLVPagesNotReserved -2214 /* Tried to move pages from the Reserved state when they were not in that state */
  1637. #define JET_errSLVPagesNotCommitted -2215 /* Tried to move pages from the Committed state when they were not in that state */
  1638. #define JET_errSLVPagesNotDeleted -2216 /* Tried to move pages from the Deleted state when they were not in that state */
  1639. #define JET_errSLVSpaceWriteConflict -2217 /* Unexpected conflict detected trying to write-latch SLV space pages */
  1640. #define JET_errSLVRootStillOpen -2218 /* The database can not be created/attached because its corresponding SLV Root is still open by another process. */
  1641. #define JET_errSLVProviderNotLoaded -2219 /* The database can not be created/attached because the SLV Provider has not been loaded. */
  1642. #define JET_errSLVEAListCorrupt -2220 /* The specified SLV EA List is corrupted. */
  1643. #define JET_errSLVRootNotSpecified -2221 /* The database cannot be created/attached because the SLV Root Name was omitted */
  1644. #define JET_errSLVRootPathInvalid -2222 /* The specified SLV Root path was invalid. */
  1645. #define JET_errSLVEAListZeroAllocation -2223 /* The specified SLV EA List has no allocated space. */
  1646. #define JET_errSLVColumnCannotDelete -2224 /* Deletion of SLV columns is not currently supported. */
  1647. #define JET_errSLVOwnerMapAlreadyExists -2225 /* Tried to create a new catalog entry for SLV Ownership Map when one already exists */
  1648. #define JET_errSLVSpaceMapAlreadyExists -2225 /* OBSOLETE: Renamed to JET_errSLVOwnerMapCorrupted */
  1649. #define JET_errSLVOwnerMapCorrupted -2226 /* Corruption encountered in SLV Ownership Map */
  1650. #define JET_errSLVSpaceMapCorrupted -2226 /* OBSOLETE: Renamed to JET_errSLVOwnerMapCorrupted */
  1651. #define JET_errSLVOwnerMapPageNotFound -2227 /* Corruption encountered in SLV Ownership Map */
  1652. #define JET_errSLVSpaceMapPageNotFound -2227 /* OBSOLETE: Renamed to JET_errSLVOwnerMapPageNotFound */
  1653. #define wrnOLDSLVNothingToMove 2228 /* Nothing in the streaming file can be moved */
  1654. #define errOLDSLVUnableToMove -2228 /* Unable to move a SLV File in the streaming file */
  1655. #define JET_errSLVFileStale -2229 /* The specified SLV File handle belongs to a SLV Root that no longer exists. */
  1656. #define JET_errSLVFileInUse -2230 /* The specified SLV File is currently in use */
  1657. #define JET_errSLVStreamingFileInUse -2231 /* The specified streaming file is currently in use */
  1658. #define JET_errSLVFileIO -2232 /* An I/O error occurred while accessing an SLV File (general read / write failure) */
  1659. #define JET_errSLVStreamingFileFull -2233 /* No space left in the streaming file */
  1660. #define JET_errSLVFileInvalidPath -2234 /* Specified path to a SLV File was invalid */
  1661. #define JET_errSLVFileAccessDenied -2235 /* Cannot access SLV File, the SLV File is locked or is in use */
  1662. #define JET_errSLVFileNotFound -2236 /* The specified SLV File was not found */
  1663. #define JET_errSLVFileUnknown -2237 /* An unknown error occurred while accessing an SLV File */
  1664. #define JET_errSLVEAListTooBig -2238 /* The specified SLV EA List could not be returned because it is too large to fit in the standard EA format. Retrieve the SLV File as a file handle instead. */
  1665. #define JET_errSLVProviderVersionMismatch -2239 /* The loaded SLV Provider's version does not match the database engine's version. */
  1666. #define errSLVInvalidOwnerMapChecksum -2240 /* checksum in OwnerMap is invalid */
  1667. #define wrnSLVDatabaseHeader 2241 /* Checking the header of a streaming file */
  1668. #define errOLDSLVMoveStopped -2242 /* OLDSLV was stopped in the middle of a move */
  1669. #define JET_errSLVBufferTooSmall -2243 /* Buffer allocated for SLV data or meta-data was too small */
  1670. #define JET_errOSSnapshotInvalidSequence -2401 /* OS Snapshot API used in an invalid sequence */
  1671. #define JET_errOSSnapshotTimeOut -2402 /* OS Snapshot ended with time-out */
  1672. #define JET_errOSSnapshotNotAllowed -2403 /* OS Snapshot not allowed (backup or recovery in progress) */
  1673. #define JET_errLSCallbackNotSpecified -3000 /* Attempted to use Local Storage without a callback function being specified */
  1674. #define JET_errLSAlreadySet -3001 /* Attempted to set Local Storage for an object which already had it set */
  1675. #define JET_errLSNotSet -3002 /* Attempted to retrieve Local Storage from an object which didn't have it set */
  1676. /** FILE ERRORS
  1677. **/
  1678. //JET_errFileAccessDenied -1032
  1679. //JET_errFileNotFound -1811
  1680. #define JET_errFileIOSparse -4000 /* an I/O was issued to a location that was sparse */
  1681. #define JET_errFileIOBeyondEOF -4001 /* a read was issued to a location beyond EOF (writes will expand the file) */
  1682. #define JET_errSFSReadVerifyFailure -6000 /* checksum error while verifying an SFS cluster */
  1683. #define JET_errSFSPathTooBig -6001 /* the specified path exceeded the maximum path length */
  1684. #define JET_errSFSEnabled -6002 /* the operation is not compatible with SFS */
  1685. #define JET_errSFSNotEnabled -6003 /* the operation requires SFS */
  1686. #define JET_errSFSVolumeNotFound -6500 /* the volume file could not be found */
  1687. #define JET_errSFSVolumeInvalidMagicNumber -6501 /* the volume had a bad magic number */
  1688. #define JET_errSFSVolumeInvalidClusterSize -6502 /* the volume's cluster size is wrong */
  1689. #define JET_errSFSVolumeIncompatibleVersion -6503 /* the volume's version too old (or new) to be used by this version of SFS (format is incompatible) */
  1690. #define JET_errSFSDirectoryDisabled -7000 /* the directory has been disabled due to an unexpected error */
  1691. #define JET_errSFSDirectoryFull -7001 /* the directory had no room for a new file to be created */
  1692. #define JET_errSFSDirectoryCorrupt -7002 /* the directory's meta data is corrupt */
  1693. #define JET_errSFSFileDisabled -7500 /* the file has been disabled due to an unexpected error */
  1694. #define JET_errSFSFileShutdown -7501 /* the file operation failed because the file is in the middle of being closed */
  1695. #define JET_errSFSFileCorrupt -7502 /* the file's meta data is corrupt */
  1696. #define JET_errSFSFileShadowCorrupt -7503 /* the file's meta data used for shadowing is corrupt */
  1697. #define JET_errSFSFileShadowDataCorrupt -7504 /* the file's shadowed data (used for atomic file-writes) was corrupt [checksum failed] */
  1698. #define errSFSFileDeleted -7504 /* INTERNAL ERROR: the file is marked as deleted and should be cleaned up */
  1699. #define JET_errSFSFileIOTooBig -8000 /* the I/O request was too large (probably because it exceeded the size of the shadow space) */
  1700. #define JET_errSFSFileIOShadowedWrite -8001 /* the I/O could not be processed because of an error during a previous shadowed write */
  1701. #define JET_errSFSFileTooFragmented -32000 /* TEMP ERROR: the SFS file is TOO FRAGMENTED to be managed by a single-cluster extent map (in the future, this will go away and we will reallocate a larger extent map; for now, you should defrag the file) */
  1702. /**********************************************************************/
  1703. /*********************** PROTOTYPES **************************/
  1704. /**********************************************************************/
  1705. #if !defined(_JET_NOPROTOTYPES)
  1706. #ifdef __cplusplus
  1707. extern "C" {
  1708. #endif
  1709. JET_ERR JET_API JetInit( JET_INSTANCE *pinstance);
  1710. JET_ERR JET_API JetInit2( JET_INSTANCE *pinstance, JET_GRBIT grbit );
  1711. JET_ERR JET_API JetInit3(
  1712. JET_INSTANCE *pinstance,
  1713. JET_RSTMAP *rgstmap,
  1714. long crstfilemap,
  1715. JET_GRBIT grbit );
  1716. JET_ERR JET_API JetCreateInstance( JET_INSTANCE *pinstance, const char * szInstanceName );
  1717. JET_ERR JET_API JetTerm( JET_INSTANCE instance );
  1718. JET_ERR JET_API JetTerm2( JET_INSTANCE instance, JET_GRBIT grbit );
  1719. JET_ERR JET_API JetStopService();
  1720. JET_ERR JET_API JetStopServiceInstance( JET_INSTANCE instance );
  1721. JET_ERR JET_API JetStopBackup();
  1722. JET_ERR JET_API JetStopBackupInstance( JET_INSTANCE instance );
  1723. JET_ERR JET_API JetSetSystemParameter(
  1724. JET_INSTANCE *pinstance,
  1725. JET_SESID sesid,
  1726. unsigned long paramid,
  1727. ULONG_PTR lParam,
  1728. const char *sz );
  1729. JET_ERR JET_API JetGetSystemParameter(
  1730. JET_INSTANCE instance,
  1731. JET_SESID sesid,
  1732. unsigned long paramid,
  1733. ULONG_PTR *plParam,
  1734. char *sz,
  1735. unsigned long cbMax );
  1736. JET_ERR JET_API JetEnableMultiInstance( JET_SETSYSPARAM * psetsysparam,
  1737. unsigned long csetsysparam,
  1738. unsigned long * pcsetsucceed);
  1739. JET_ERR JET_API JetResetCounter( JET_SESID sesid, long CounterType );
  1740. JET_ERR JET_API JetGetCounter( JET_SESID sesid, long CounterType, long *plValue );
  1741. JET_ERR JET_API JetBeginSession(
  1742. JET_INSTANCE instance,
  1743. JET_SESID *psesid,
  1744. const char *szUserName,
  1745. const char *szPassword );
  1746. JET_ERR JET_API JetDupSession( JET_SESID sesid, JET_SESID *psesid );
  1747. JET_ERR JET_API JetEndSession( JET_SESID sesid, JET_GRBIT grbit );
  1748. JET_ERR JET_API JetGetVersion( JET_SESID sesid, unsigned long *pwVersion );
  1749. JET_ERR JET_API JetIdle( JET_SESID sesid, JET_GRBIT grbit );
  1750. JET_ERR JET_API JetCreateDatabase(
  1751. JET_SESID sesid,
  1752. const char *szFilename,
  1753. const char *szConnect,
  1754. JET_DBID *pdbid,
  1755. JET_GRBIT grbit );
  1756. JET_ERR JET_API JetCreateDatabase2(
  1757. JET_SESID sesid,
  1758. const char *szFilename,
  1759. const unsigned long cpgDatabaseSizeMax,
  1760. JET_DBID *pdbid,
  1761. JET_GRBIT grbit );
  1762. JET_ERR JET_API JetCreateDatabaseWithStreaming(
  1763. JET_SESID sesid,
  1764. const char *szDbFileName,
  1765. const char *szSLVFileName,
  1766. const char *szSLVRootName,
  1767. const unsigned long cpgDatabaseSizeMax,
  1768. JET_DBID *pdbid,
  1769. JET_GRBIT grbit );
  1770. JET_ERR JET_API JetAttachDatabase(
  1771. JET_SESID sesid,
  1772. const char *szFilename,
  1773. JET_GRBIT grbit );
  1774. JET_ERR JET_API JetAttachDatabase2(
  1775. JET_SESID sesid,
  1776. const char *szFilename,
  1777. const unsigned long cpgDatabaseSizeMax,
  1778. JET_GRBIT grbit );
  1779. JET_ERR JET_API JetAttachDatabaseWithStreaming(
  1780. JET_SESID sesid,
  1781. const char *szDbFileName,
  1782. const char *szSLVFileName,
  1783. const char *szSLVRootName,
  1784. const unsigned long cpgDatabaseSizeMax,
  1785. JET_GRBIT grbit );
  1786. JET_ERR JET_API JetDetachDatabase(
  1787. JET_SESID sesid,
  1788. const char *szFilename );
  1789. JET_ERR JET_API JetDetachDatabase2(
  1790. JET_SESID sesid,
  1791. const char *szFilename,
  1792. JET_GRBIT grbit);
  1793. JET_ERR JET_API JetGetObjectInfo(
  1794. JET_SESID sesid,
  1795. JET_DBID dbid,
  1796. JET_OBJTYP objtyp,
  1797. const char *szContainerName,
  1798. const char *szObjectName,
  1799. void *pvResult,
  1800. unsigned long cbMax,
  1801. unsigned long InfoLevel );
  1802. JET_ERR JET_API JetGetTableInfo(
  1803. JET_SESID sesid,
  1804. JET_TABLEID tableid,
  1805. void *pvResult,
  1806. unsigned long cbMax,
  1807. unsigned long InfoLevel );
  1808. JET_ERR JET_API JetCreateTable(
  1809. JET_SESID sesid,
  1810. JET_DBID dbid,
  1811. const char *szTableName,
  1812. unsigned long lPages,
  1813. unsigned long lDensity,
  1814. JET_TABLEID *ptableid );
  1815. JET_ERR JET_API JetCreateTableColumnIndex(
  1816. JET_SESID sesid,
  1817. JET_DBID dbid,
  1818. JET_TABLECREATE *ptablecreate );
  1819. JET_ERR JET_API JetCreateTableColumnIndex2(
  1820. JET_SESID sesid,
  1821. JET_DBID dbid,
  1822. JET_TABLECREATE2 *ptablecreate );
  1823. JET_ERR JET_API JetDeleteTable(
  1824. JET_SESID sesid,
  1825. JET_DBID dbid,
  1826. const char *szTableName );
  1827. JET_ERR JET_API JetRenameTable(
  1828. JET_SESID sesid,
  1829. JET_DBID dbid,
  1830. const char *szName,
  1831. const char *szNameNew );
  1832. JET_ERR JET_API JetGetTableColumnInfo(
  1833. JET_SESID sesid,
  1834. JET_TABLEID tableid,
  1835. const char *szColumnName,
  1836. void *pvResult,
  1837. unsigned long cbMax,
  1838. unsigned long InfoLevel );
  1839. JET_ERR JET_API JetGetColumnInfo(
  1840. JET_SESID sesid,
  1841. JET_DBID dbid,
  1842. const char *szTableName,
  1843. const char *szColumnName,
  1844. void *pvResult,
  1845. unsigned long cbMax,
  1846. unsigned long InfoLevel );
  1847. JET_ERR JET_API JetAddColumn(
  1848. JET_SESID sesid,
  1849. JET_TABLEID tableid,
  1850. const char *szColumnName,
  1851. const JET_COLUMNDEF *pcolumndef,
  1852. const void *pvDefault,
  1853. unsigned long cbDefault,
  1854. JET_COLUMNID *pcolumnid );
  1855. JET_ERR JET_API JetDeleteColumn(
  1856. JET_SESID sesid,
  1857. JET_TABLEID tableid,
  1858. const char *szColumnName );
  1859. JET_ERR JET_API JetDeleteColumn2(
  1860. JET_SESID sesid,
  1861. JET_TABLEID tableid,
  1862. const char *szColumnName,
  1863. const JET_GRBIT grbit );
  1864. JET_ERR JET_API JetRenameColumn(
  1865. JET_SESID sesid,
  1866. JET_TABLEID tableid,
  1867. const char *szName,
  1868. const char *szNameNew,
  1869. JET_GRBIT grbit );
  1870. JET_ERR JET_API JetSetColumnDefaultValue(
  1871. JET_SESID sesid,
  1872. JET_DBID dbid,
  1873. const char *szTableName,
  1874. const char *szColumnName,
  1875. const void *pvData,
  1876. const unsigned long cbData,
  1877. const JET_GRBIT grbit );
  1878. JET_ERR JET_API JetGetTableIndexInfo(
  1879. JET_SESID sesid,
  1880. JET_TABLEID tableid,
  1881. const char *szIndexName,
  1882. void *pvResult,
  1883. unsigned long cbResult,
  1884. unsigned long InfoLevel );
  1885. JET_ERR JET_API JetGetIndexInfo(
  1886. JET_SESID sesid,
  1887. JET_DBID dbid,
  1888. const char *szTableName,
  1889. const char *szIndexName,
  1890. void *pvResult,
  1891. unsigned long cbResult,
  1892. unsigned long InfoLevel );
  1893. JET_ERR JET_API JetCreateIndex(
  1894. JET_SESID sesid,
  1895. JET_TABLEID tableid,
  1896. const char *szIndexName,
  1897. JET_GRBIT grbit,
  1898. const char *szKey,
  1899. unsigned long cbKey,
  1900. unsigned long lDensity );
  1901. JET_ERR JET_API JetCreateIndex2(
  1902. JET_SESID sesid,
  1903. JET_TABLEID tableid,
  1904. JET_INDEXCREATE *pindexcreate,
  1905. unsigned long cIndexCreate );
  1906. JET_ERR JET_API JetDeleteIndex(
  1907. JET_SESID sesid,
  1908. JET_TABLEID tableid,
  1909. const char *szIndexName );
  1910. JET_ERR JET_API JetBeginTransaction( JET_SESID sesid );
  1911. JET_ERR JET_API JetBeginTransaction2( JET_SESID sesid, JET_GRBIT grbit );
  1912. JET_ERR JET_API JetPrepareToCommitTransaction(
  1913. JET_SESID sesid,
  1914. const void * pvData,
  1915. unsigned long cbData,
  1916. JET_GRBIT grbit );
  1917. JET_ERR JET_API JetCommitTransaction( JET_SESID sesid, JET_GRBIT grbit );
  1918. JET_ERR JET_API JetRollback( JET_SESID sesid, JET_GRBIT grbit );
  1919. JET_ERR JET_API JetGetDatabaseInfo(
  1920. JET_SESID sesid,
  1921. JET_DBID dbid,
  1922. void *pvResult,
  1923. unsigned long cbMax,
  1924. unsigned long InfoLevel );
  1925. JET_ERR JET_API JetGetDatabaseFileInfo(
  1926. const char *szDatabaseName,
  1927. void *pvResult,
  1928. unsigned long cbMax,
  1929. unsigned long InfoLevel );
  1930. JET_ERR JET_API JetOpenDatabase(
  1931. JET_SESID sesid,
  1932. const char *szFilename,
  1933. const char *szConnect,
  1934. JET_DBID *pdbid,
  1935. JET_GRBIT grbit );
  1936. JET_ERR JET_API JetCloseDatabase(
  1937. JET_SESID sesid,
  1938. JET_DBID dbid,
  1939. JET_GRBIT grbit );
  1940. JET_ERR JET_API JetOpenTable(
  1941. JET_SESID sesid,
  1942. JET_DBID dbid,
  1943. const char *szTableName,
  1944. const void *pvParameters,
  1945. unsigned long cbParameters,
  1946. JET_GRBIT grbit,
  1947. JET_TABLEID *ptableid );
  1948. JET_ERR JET_API JetSetTableSequential(
  1949. JET_SESID sesid,
  1950. JET_TABLEID tableid,
  1951. JET_GRBIT grbit );
  1952. JET_ERR JET_API JetResetTableSequential(
  1953. JET_SESID sesid,
  1954. JET_TABLEID tableid,
  1955. JET_GRBIT grbit );
  1956. JET_ERR JET_API JetCloseTable( JET_SESID sesid, JET_TABLEID tableid );
  1957. JET_ERR JET_API JetDelete( JET_SESID sesid, JET_TABLEID tableid );
  1958. JET_ERR JET_API JetUpdate(
  1959. JET_SESID sesid,
  1960. JET_TABLEID tableid,
  1961. void *pvBookmark,
  1962. unsigned long cbBookmark,
  1963. unsigned long *pcbActual);
  1964. JET_ERR JET_API JetEscrowUpdate(
  1965. JET_SESID sesid,
  1966. JET_TABLEID tableid,
  1967. JET_COLUMNID columnid,
  1968. void *pv,
  1969. unsigned long cbMax,
  1970. void *pvOld,
  1971. unsigned long cbOldMax,
  1972. unsigned long *pcbOldActual,
  1973. JET_GRBIT grbit );
  1974. JET_ERR JET_API JetRetrieveColumn(
  1975. JET_SESID sesid,
  1976. JET_TABLEID tableid,
  1977. JET_COLUMNID columnid,
  1978. void *pvData,
  1979. unsigned long cbData,
  1980. unsigned long *pcbActual,
  1981. JET_GRBIT grbit,
  1982. JET_RETINFO *pretinfo );
  1983. JET_ERR JET_API JetRetrieveColumns(
  1984. JET_SESID sesid,
  1985. JET_TABLEID tableid,
  1986. JET_RETRIEVECOLUMN *pretrievecolumn,
  1987. unsigned long cretrievecolumn );
  1988. JET_ERR JET_API JetRetrieveTaggedColumnList(
  1989. JET_SESID sesid,
  1990. JET_TABLEID tableid,
  1991. unsigned long *pcColumns,
  1992. void *pvData,
  1993. unsigned long cbData,
  1994. JET_COLUMNID columnidStart,
  1995. JET_GRBIT grbit );
  1996. JET_ERR JET_API JetSetColumn(
  1997. JET_SESID sesid,
  1998. JET_TABLEID tableid,
  1999. JET_COLUMNID columnid,
  2000. const void *pvData,
  2001. unsigned long cbData,
  2002. JET_GRBIT grbit,
  2003. JET_SETINFO *psetinfo );
  2004. JET_ERR JET_API JetSetColumns(
  2005. JET_SESID sesid,
  2006. JET_TABLEID tableid,
  2007. JET_SETCOLUMN *psetcolumn,
  2008. unsigned long csetcolumn );
  2009. JET_ERR JET_API JetPrepareUpdate(
  2010. JET_SESID sesid,
  2011. JET_TABLEID tableid,
  2012. unsigned long prep );
  2013. JET_ERR JET_API JetGetRecordPosition(
  2014. JET_SESID sesid,
  2015. JET_TABLEID tableid,
  2016. JET_RECPOS *precpos,
  2017. unsigned long cbRecpos );
  2018. JET_ERR JET_API JetGotoPosition(
  2019. JET_SESID sesid,
  2020. JET_TABLEID tableid,
  2021. JET_RECPOS *precpos );
  2022. JET_ERR JET_API JetGetCursorInfo(
  2023. JET_SESID sesid,
  2024. JET_TABLEID tableid,
  2025. void *pvResult,
  2026. unsigned long cbMax,
  2027. unsigned long InfoLevel );
  2028. JET_ERR JET_API JetDupCursor(
  2029. JET_SESID sesid,
  2030. JET_TABLEID tableid,
  2031. JET_TABLEID *ptableid,
  2032. JET_GRBIT grbit );
  2033. JET_ERR JET_API JetGetCurrentIndex(
  2034. JET_SESID sesid,
  2035. JET_TABLEID tableid,
  2036. char *szIndexName,
  2037. unsigned long cchIndexName );
  2038. JET_ERR JET_API JetSetCurrentIndex(
  2039. JET_SESID sesid,
  2040. JET_TABLEID tableid,
  2041. const char *szIndexName );
  2042. JET_ERR JET_API JetSetCurrentIndex2(
  2043. JET_SESID sesid,
  2044. JET_TABLEID tableid,
  2045. const char *szIndexName,
  2046. JET_GRBIT grbit );
  2047. JET_ERR JET_API JetSetCurrentIndex3(
  2048. JET_SESID sesid,
  2049. JET_TABLEID tableid,
  2050. const char *szIndexName,
  2051. JET_GRBIT grbit,
  2052. unsigned long itagSequence );
  2053. JET_ERR JET_API JetSetCurrentIndex4(
  2054. JET_SESID sesid,
  2055. JET_TABLEID tableid,
  2056. const char *szIndexName,
  2057. JET_INDEXID *pindexid,
  2058. JET_GRBIT grbit,
  2059. unsigned long itagSequence );
  2060. JET_ERR JET_API JetMove(
  2061. JET_SESID sesid,
  2062. JET_TABLEID tableid,
  2063. long cRow,
  2064. JET_GRBIT grbit );
  2065. JET_ERR JET_API JetGetLock(
  2066. JET_SESID sesid,
  2067. JET_TABLEID tableid,
  2068. JET_GRBIT grbit );
  2069. JET_ERR JET_API JetMakeKey(
  2070. JET_SESID sesid,
  2071. JET_TABLEID tableid,
  2072. const void *pvData,
  2073. unsigned long cbData,
  2074. JET_GRBIT grbit );
  2075. JET_ERR JET_API JetSeek(
  2076. JET_SESID sesid,
  2077. JET_TABLEID tableid,
  2078. JET_GRBIT grbit );
  2079. JET_ERR JET_API JetGetBookmark(
  2080. JET_SESID sesid,
  2081. JET_TABLEID tableid,
  2082. void *pvBookmark,
  2083. unsigned long cbMax,
  2084. unsigned long *pcbActual );
  2085. JET_ERR JET_API JetCompact(
  2086. JET_SESID sesid,
  2087. const char *szDatabaseSrc,
  2088. const char *szDatabaseDest,
  2089. JET_PFNSTATUS pfnStatus,
  2090. JET_CONVERT *pconvert,
  2091. JET_GRBIT grbit );
  2092. JET_ERR JET_API JetDefragment(
  2093. JET_SESID sesid,
  2094. JET_DBID dbid,
  2095. const char *szTableName,
  2096. unsigned long *pcPasses,
  2097. unsigned long *pcSeconds,
  2098. JET_GRBIT grbit );
  2099. JET_ERR JET_API JetDefragment2(
  2100. JET_SESID sesid,
  2101. JET_DBID dbid,
  2102. const char *szTableName,
  2103. unsigned long *pcPasses,
  2104. unsigned long *pcSeconds,
  2105. JET_CALLBACK callback,
  2106. JET_GRBIT grbit );
  2107. JET_ERR JET_API JetConvertDDL(
  2108. JET_SESID sesid,
  2109. JET_DBID dbid,
  2110. JET_OPDDLCONV convtyp,
  2111. void *pvData,
  2112. unsigned long cbData );
  2113. JET_ERR JET_API JetUpgradeDatabase(
  2114. JET_SESID sesid,
  2115. const char *szDbFileName,
  2116. const char *szSLVFileName,
  2117. const JET_GRBIT grbit );
  2118. JET_ERR JET_API JetSetDatabaseSize(
  2119. JET_SESID sesid,
  2120. const char *szDatabaseName,
  2121. unsigned long cpg,
  2122. unsigned long *pcpgReal );
  2123. JET_ERR JET_API JetGrowDatabase(
  2124. JET_SESID sesid,
  2125. JET_DBID dbid,
  2126. unsigned long cpg,
  2127. unsigned long *pcpgReal );
  2128. JET_ERR JET_API JetSetSessionContext(
  2129. JET_SESID sesid,
  2130. ULONG_PTR ulContext );
  2131. JET_ERR JET_API JetResetSessionContext(
  2132. JET_SESID sesid );
  2133. JET_ERR JET_API JetDBUtilities( JET_DBUTIL *pdbutil );
  2134. JET_ERR JET_API JetGotoBookmark(
  2135. JET_SESID sesid,
  2136. JET_TABLEID tableid,
  2137. void *pvBookmark,
  2138. unsigned long cbBookmark );
  2139. JET_ERR JET_API JetIntersectIndexes(
  2140. JET_SESID sesid,
  2141. JET_INDEXRANGE * rgindexrange,
  2142. unsigned long cindexrange,
  2143. JET_RECORDLIST * precordlist,
  2144. JET_GRBIT grbit );
  2145. JET_ERR JET_API JetComputeStats( JET_SESID sesid, JET_TABLEID tableid );
  2146. JET_ERR JET_API JetOpenTempTable(JET_SESID sesid,
  2147. const JET_COLUMNDEF *prgcolumndef, unsigned long ccolumn,
  2148. JET_GRBIT grbit, JET_TABLEID *ptableid,
  2149. JET_COLUMNID *prgcolumnid);
  2150. JET_ERR JET_API JetOpenTempTable2(
  2151. JET_SESID sesid,
  2152. const JET_COLUMNDEF *prgcolumndef,
  2153. unsigned long ccolumn,
  2154. unsigned long lcid,
  2155. JET_GRBIT grbit,
  2156. JET_TABLEID *ptableid,
  2157. JET_COLUMNID *prgcolumnid );
  2158. JET_ERR JET_API JetOpenTempTable3(
  2159. JET_SESID sesid,
  2160. const JET_COLUMNDEF *prgcolumndef,
  2161. unsigned long ccolumn,
  2162. JET_UNICODEINDEX *pidxunicode,
  2163. JET_GRBIT grbit,
  2164. JET_TABLEID *ptableid,
  2165. JET_COLUMNID *prgcolumnid );
  2166. JET_ERR JET_API JetBackup( const char *szBackupPath, JET_GRBIT grbit, JET_PFNSTATUS pfnStatus );
  2167. JET_ERR JET_API JetBackupInstance( JET_INSTANCE instance,
  2168. const char *szBackupPath,
  2169. JET_GRBIT grbit,
  2170. JET_PFNSTATUS pfnStatus );
  2171. JET_ERR JET_API JetRestore(const char *sz, JET_PFNSTATUS pfn );
  2172. JET_ERR JET_API JetRestore2(const char *sz, const char *szDest, JET_PFNSTATUS pfn );
  2173. JET_ERR JET_API JetRestoreInstance( JET_INSTANCE instance,
  2174. const char *sz,
  2175. const char *szDest,
  2176. JET_PFNSTATUS pfn );
  2177. JET_ERR JET_API JetSetIndexRange(JET_SESID sesid,
  2178. JET_TABLEID tableidSrc, JET_GRBIT grbit);
  2179. JET_ERR JET_API JetIndexRecordCount(JET_SESID sesid,
  2180. JET_TABLEID tableid, unsigned long *pcrec, unsigned long crecMax );
  2181. JET_ERR JET_API JetRetrieveKey(JET_SESID sesid,
  2182. JET_TABLEID tableid, void *pvData, unsigned long cbMax,
  2183. unsigned long *pcbActual, JET_GRBIT grbit );
  2184. JET_ERR JET_API JetBeginExternalBackup( JET_GRBIT grbit );
  2185. JET_ERR JET_API JetBeginExternalBackupInstance( JET_INSTANCE instance, JET_GRBIT grbit );
  2186. JET_ERR JET_API JetGetAttachInfo( void *pv,
  2187. unsigned long cbMax,
  2188. unsigned long *pcbActual );
  2189. JET_ERR JET_API JetGetAttachInfoInstance( JET_INSTANCE instance,
  2190. void *pv,
  2191. unsigned long cbMax,
  2192. unsigned long *pcbActual );
  2193. JET_ERR JET_API JetOpenFile( const char *szFileName,
  2194. JET_HANDLE *phfFile,
  2195. unsigned long *pulFileSizeLow,
  2196. unsigned long *pulFileSizeHigh );
  2197. JET_ERR JET_API JetOpenFileInstance( JET_INSTANCE instance,
  2198. const char *szFileName,
  2199. JET_HANDLE *phfFile,
  2200. unsigned long *pulFileSizeLow,
  2201. unsigned long *pulFileSizeHigh );
  2202. JET_ERR JET_API JetOpenFileSectionInstance(
  2203. JET_INSTANCE instance,
  2204. char *szFile,
  2205. JET_HANDLE *phFile,
  2206. long iSection,
  2207. long cSections,
  2208. unsigned long *pulSectionSizeLow,
  2209. long *plSectionSizeHigh);
  2210. JET_ERR JET_API JetReadFile( JET_HANDLE hfFile,
  2211. void *pv,
  2212. unsigned long cb,
  2213. unsigned long *pcb );
  2214. JET_ERR JET_API JetReadFileInstance( JET_INSTANCE instance,
  2215. JET_HANDLE hfFile,
  2216. void *pv,
  2217. unsigned long cb,
  2218. unsigned long *pcb );
  2219. JET_ERR JET_API JetAsyncReadFileInstance( JET_INSTANCE instance,
  2220. JET_HANDLE hfFile,
  2221. void* pv,
  2222. unsigned long cb,
  2223. JET_OLP *pjolp );
  2224. JET_ERR JET_API JetCheckAsyncReadFileInstance( JET_INSTANCE instance,
  2225. void *pv,
  2226. int cb,
  2227. unsigned long pgnoFirst );
  2228. JET_ERR JET_API JetCloseFile( JET_HANDLE hfFile );
  2229. JET_ERR JET_API JetCloseFileInstance( JET_INSTANCE instance, JET_HANDLE hfFile );
  2230. JET_ERR JET_API JetGetLogInfo( void *pv,
  2231. unsigned long cbMax,
  2232. unsigned long *pcbActual );
  2233. JET_ERR JET_API JetGetLogInfoInstance( JET_INSTANCE instance,
  2234. void *pv,
  2235. unsigned long cbMax,
  2236. unsigned long *pcbActual );
  2237. #define JET_BASE_NAME_LENGTH 3
  2238. typedef struct
  2239. {
  2240. unsigned long cbSize;
  2241. unsigned long ulGenLow;
  2242. unsigned long ulGenHigh;
  2243. char szBaseName[ JET_BASE_NAME_LENGTH + 1 ];
  2244. } JET_LOGINFO;
  2245. JET_ERR JET_API JetGetLogInfoInstance2( JET_INSTANCE instance,
  2246. void *pv,
  2247. unsigned long cbMax,
  2248. unsigned long *pcbActual,
  2249. JET_LOGINFO * pLogInfo);
  2250. JET_ERR JET_API JetGetTruncateLogInfoInstance( JET_INSTANCE instance,
  2251. void *pv,
  2252. unsigned long cbMax,
  2253. unsigned long *pcbActual );
  2254. JET_ERR JET_API JetTruncateLog( void );
  2255. JET_ERR JET_API JetTruncateLogInstance( JET_INSTANCE instance );
  2256. JET_ERR JET_API JetEndExternalBackup( void );
  2257. JET_ERR JET_API JetEndExternalBackupInstance( JET_INSTANCE instance );
  2258. /* Flags for JetEndExternalBackupInstance2 */
  2259. #define JET_bitBackupEndNormal 0x0001
  2260. #define JET_bitBackupEndAbort 0x0002
  2261. JET_ERR JET_API JetEndExternalBackupInstance2( JET_INSTANCE instance, JET_GRBIT grbit );
  2262. JET_ERR JET_API JetExternalRestore( char *szCheckpointFilePath,
  2263. char *szLogPath,
  2264. JET_RSTMAP *rgstmap,
  2265. long crstfilemap,
  2266. char *szBackupLogPath,
  2267. long genLow,
  2268. long genHigh,
  2269. JET_PFNSTATUS pfn );
  2270. JET_ERR JET_API JetExternalRestore2( char *szCheckpointFilePath,
  2271. char *szLogPath,
  2272. JET_RSTMAP *rgstmap,
  2273. long crstfilemap,
  2274. char *szBackupLogPath,
  2275. JET_LOGINFO * pLogInfo,
  2276. char *szTargetInstanceName,
  2277. char *szTargetInstanceLogPath,
  2278. char *szTargetInstanceCheckpointPath,
  2279. JET_PFNSTATUS pfn );
  2280. JET_ERR JET_API JetSnapshotStart( JET_INSTANCE instance,
  2281. char * szDatabases,
  2282. JET_GRBIT grbit);
  2283. JET_ERR JET_API JetSnapshotStop( JET_INSTANCE instance,
  2284. JET_GRBIT grbit);
  2285. JET_ERR JET_API JetRegisterCallback(
  2286. JET_SESID sesid,
  2287. JET_TABLEID tableid,
  2288. JET_CBTYP cbtyp,
  2289. JET_CALLBACK pCallback,
  2290. void * pvContext,
  2291. JET_HANDLE *phCallbackId );
  2292. JET_ERR JET_API JetUnregisterCallback(
  2293. JET_SESID sesid,
  2294. JET_TABLEID tableid,
  2295. JET_CBTYP cbtyp,
  2296. JET_HANDLE hCallbackId );
  2297. typedef struct _JET_INSTANCE_INFO
  2298. {
  2299. JET_INSTANCE hInstanceId;
  2300. char * szInstanceName;
  2301. ULONG_PTR cDatabases;
  2302. char ** szDatabaseFileName;
  2303. char ** szDatabaseDisplayName;
  2304. char ** szDatabaseSLVFileName;
  2305. } JET_INSTANCE_INFO;
  2306. JET_ERR JET_API JetGetInstanceInfo( unsigned long *pcInstanceInfo, JET_INSTANCE_INFO ** paInstanceInfo );
  2307. JET_ERR JET_API JetFreeBuffer( char *pbBuf );
  2308. JET_ERR JET_API JetSetLS(
  2309. JET_SESID sesid,
  2310. JET_TABLEID tableid,
  2311. JET_LS ls,
  2312. JET_GRBIT grbit );
  2313. JET_ERR JET_API JetGetLS(
  2314. JET_SESID sesid,
  2315. JET_TABLEID tableid,
  2316. JET_LS *pls,
  2317. JET_GRBIT grbit );
  2318. typedef ULONG_PTR JET_OSSNAPID; /* Snapshot Session Identifier */
  2319. JET_ERR JET_API JetOSSnapshotPrepare( JET_OSSNAPID * psnapId, const JET_GRBIT grbit );
  2320. JET_ERR JET_API JetOSSnapshotFreeze( const JET_OSSNAPID snapId, unsigned long *pcInstanceInfo, JET_INSTANCE_INFO ** paInstanceInfo, const JET_GRBIT grbit );
  2321. JET_ERR JET_API JetOSSnapshotThaw( const JET_OSSNAPID snapId, const JET_GRBIT grbit );
  2322. #ifdef __cplusplus
  2323. }
  2324. #endif
  2325. #endif /* _JET_NOPROTOTYPES */
  2326. #include <poppack.h>
  2327. #ifdef __cplusplus
  2328. }
  2329. #endif
  2330. #endif /* _JET_INCLUDED */