Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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