⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idapi.h

📁 一个短小精悍的PARADOX数据文件DB的修复工具
💻 H
📖 第 1 页 / 共 5 页
字号:
      DBIKEY         aiOthTabFld;            // Fields in other table
   } RINTDesc;
typedef RINTDesc FAR *pRINTDesc;


//============================================================================
//                    Security descriptor
//============================================================================
// Family rights

#define NOFAMRIGHTS     0x00                 // No Family rights
#define FORMRIGHTS      0x01                 // Can change form
#define RPTRIGHTS       0x02                 // Can change reports
#define VALRIGHTS       0x04                 // Can change valchecks
#define SETRIGHTS       0x08                 // Can change settings
#define ALLFAMRIGHTS    (FORMRIGHTS | RPTRIGHTS | VALRIGHTS | SETRIGHTS)
                                             // All family rights

typedef enum  {                           // Privileges
      prvNONE        = 0,                    // No privilege
      prvREADONLY    = 0x01,                 // Read only Table or Field
      prvMODIFY      = 0x03,                 // Read and Modify fields (non-key)
      prvINSERT      = 0x07,                 // Insert + All of above
      prvINSDEL      = 0x0F,                 // Delete + All of above
      prvFULL        = 0x1F,                 // Full Writes
      prvUNKNOWN     = 0xFF                  // Unknown
   } PRVType;


typedef struct {                             // Security description
      UINT16         iSecNum;                   // Nbr to identify desc
      PRVType        eprvTable;                 // Table privileges
      UINT16         iFamRights;                // Family rights
      DBINAME        szPassword;                // Null terminated string
      PRVType        aprvFld[DBIMAXFLDSINSEC];  // Field level privileges (prvNONE/prvREADONLY/prvFULL)
   } SECDesc;
typedef SECDesc FAR *pSECDesc;


//======================================================================
//                         Miscellaneous
//======================================================================

// Index Id used to open table without a default index (i.e. no order)

#define  NODEFAULTINDEX    0xFFFF


//============================================================================
//                    Object types
//============================================================================

typedef enum
   {
       objSYSTEM                 = 1,      // System object
       objSESSION                = 2,      // Session object
       objDRIVER                 = 3,      // Driver object
       objDATABASE               = 4,      // Database object
       objCURSOR                 = 5,      // Cursor object
       objSTATEMENT              = 6,      // Statement object
       objCLIENT                 = 7,      // Client object
       objDBSEC                  = 8,      // DbSystem object (dBASE only)
       objREPOSITORY             = 9       // Data Repository object
   }  DBIOBJType;

//============================================================================
//                    Cursor properties
//============================================================================


typedef enum                              // Database/Table Share type
   {
      dbiOPENSHARED     = 0,                 // Open shared  (Default)
      dbiOPENEXCL       = 1,                 // Open exclusive
   } DBIShareMode;

typedef enum                              // Database/Table Access type
   {
      dbiREADWRITE      = 0,                 // Read + Write   (Default)
      dbiREADONLY       = 1                  // Read only
   } DBIOpenMode;

typedef enum                              // Lock types (Table level)
   {
      dbiNOLOCK         = 0,                 // No lock   (Default)
      dbiWRITELOCK      = 1,                 // Write lock
      dbiREADLOCK       = 2                  // Read lock
   } DBILockType;

typedef enum                              // Field translate mode
   {
      xltNONE        = 0,                    // No translation  (Physical Types)
      xltRECORD      = 1,                    // Record level translation (not supported)
      xltFIELD       = 2,                    // Field level translation (Logical types)
   } XLTMode;

typedef enum                              // Update lock mode (SQL only)
   {
      updWHEREALL    = 0,                    // All fields in WHERE clause
      updWHEREKEYCHG = 1,                    // Keyed and changed fields in WHERE clause
      updWHEREKEY    = 2                     // Keyed fields in WHERE clause
   } UPDLockMode;


// Table levels

#define TBLLEVEL3    3              // Paradox level 3 and dBASE level 3+
#define TBLLEVEL4    4              // Paradox level 4 and dBASE level 4
#define TBLLEVEL5    5              // Paradox level 5 and dBASE/Win
#define TBLLEVEL7    7              // Paradox level 7 , Win32
#define FOXLEVEL25   25             // Fox Table (Ver 2.5)

typedef struct {                          // Virtual Table properties
      DBITBLNAME     szName;                 // table name (no extension, if it can be derived)
      UINT16         iFNameSize;             // Full file name size
      DBINAME        szTableType;            // Driver type
      UINT16         iFields;                // No of fields in Table
      UINT16         iRecSize;               // Record size (logical record)
      UINT16         iRecBufSize;            // Record size (physical record)
      UINT16         iKeySize;               // Key size
      UINT16         iIndexes;               // Number of indexes
      UINT16         iValChecks;             // Number of val checks
      UINT16         iRefIntChecks;          // Number of Ref Integrity constraints
      UINT16         iBookMarkSize;          // Bookmark size
      BOOL16         bBookMarkStable;        // Stable book marks
      DBIOpenMode    eOpenMode;              // ReadOnly / RW
      DBIShareMode   eShareMode;             // Excl / Share
      BOOL16         bIndexed;               // Index is in use
      INT16          iSeqNums;               // 1: Has Seqnums; 0: Has Record#
                                             // <0 (-1, -2, ...): None (e.g. SQL)
      BOOL16         bSoftDeletes;           // Supports soft deletes
      BOOL16         bDeletedOn;             // If above, deleted recs seen
      UINT16         iRefRange;              // Not used
      XLTMode        exltMode;               // Translate Mode
      UINT16         iRestrVersion;          // Restructure version number
      BOOL16         bUniDirectional;        // Cursor is uni-directional
      PRVType        eprvRights;             // Table  rights
      UINT16         iFmlRights;             // Family rights
      UINT16         iPasswords;             // Number of Aux passwords
      UINT16         iCodePage;              // Codepage (0 if unknown)
      BOOL16         bProtected;             // Table is protected by password
      UINT16         iTblLevel;              // Driver dependent table level
      DBINAME        szLangDriver;           // Language driver name
      BOOL16         bFieldMap;              // Field map active
      UINT16         iBlockSize;             // Physical file blocksize in K
      BOOL16         bStrictRefInt;          // Strict referential integrity
      UINT16         iFilters     ;          // Number of filters
      BOOL16         bTempTable   ;          // Table is a temporary table
      UINT16         iUnUsed[16];
     } CURProps;
typedef CURProps FAR *pCURProps;

//============================================================================
//                   Record Properties
//============================================================================


typedef struct {                          // Record properties
      UINT32         iSeqNum;                // When Seq# supported only
      UINT32         iPhyRecNum;             // When Phy Rec#s supported only
      UINT16         bRecChanged;            // Used by Delayed Updates Cur
      BOOL16         bSeqNumChanged;         // Not used
      BOOL16         bDeleteFlag;            // When soft delete supported only
   } RECProps;
typedef RECProps FAR *pRECProps;


//============================================================================
//                   General properties  DbiGetProp/DbiSetProp
//============================================================================


// Cursor properties
// General

#define  curMAXPROPS         0x00050000l   //ro UINT16   , Number of defined properties
#define  curTABLENAME        0x00050001l   //ro pTBLNAME , Table name
#define  curTABLETYPE        0x00050002l   //ro pDBINAME , Table type
#define  curTABLELEVEL       0x00050003l   //ro UINT16   , Table level 1..n
#define  curFILENAME         0x00050004l   //ro pPATH    , Full filename
#define  curXLTMODE          0x00050005l   //rw XLTMode  , Translate mode
#define  curSEQREADON        0x00050006l   //rw BOOL     , Sequential read mode hint ON
#define  curONEPASSON        0x00050007l   //rw BOOL     , One pass mode hint ON
#define  curUPDATETS         0x00050008l   //ro TIMESTAMP, Update timestamp
#define  curSOFTDELETEON     0x00050009l   //rw BOOL     , Softdelete ON
#define  curLANGDRVNAME      0x0005000Al   //ro pCHAR    , Symbolic language drv. name
#define  curCURSORNAME       0x0005000Bl   //ro pCHAR    , name of the cursor
#define  maxcurPROPS      11               // keep in sync when adding cursor properties

// Paradox specific
#define  curPDXMAXPROPS      0x01050000l   //ro UINT16   , Number of defined properties
#define  maxcurPDXPROPS   0

// DBase specific
#define  curDBMAXPROPS       0x02050000l   //ro UINT16   , Number of defined properties
#define  curINEXACTON        0x02050001l   //rw BOOL     , InExact match ON
#define  curSHAREMODE        0x02050002l   //rw DBIShareMode, Share mode
#define  maxcurDBPROPS    2

// Text Driver specific
#define  curDELIMITALLFLDS   0x03050000l   //rw BOOL , Delimit all fields.
#define  curUSESCHEMAFILE    0x03050001l   //rw BOOL , read schema from a file

// SQL Driver specific
#define  curUPDLOCKMODE      0x04050000l   //rw UPDLockMode ,Update lock mode
#define  curNATIVEHNDL       0x04050001l   //ro pBYTE       ,Native cursor handle
#define  curMAXROWS          0x04050002l   //rw INT32       ,Max # of rows to fetch from server
#define  curGETEXTENDEDINFO  0x04050003l   //rw BOOL , Get RINT info etc.

// Delayed Updates Specific.
#define  curDELAYUPDRECSTATE        0x05050001l  // ro DELYUPDCbDesc
#define  curDELAYUPDABORTRESTORE    0x05050002l  // rw BOOL, restore state
                                                 // when commit is aborted.
#define  curDELAYUPDDISPLAYOPT      0x05050003l  // rw UINT16, view records
                                                 // with specific update stat
#define  curDELAYUPDGETOLDRECORD    0x05050004l  // rw BOOL, get un-modified
                                                 // rec buf for modified recs
#define  curDELAYUPDNUMUPDATES      0x05050005l  // ro INT32, num of updates
#define  curDELAYUPDUSECALLBACK     0x05050006l  // rw BOOL, callback usr.

// Driver properties
// General
#define  drvMAXPROPS         0x00030000l   //ro UINT16   , Number of defined properties
#define  drvDRIVERTYPE       0x00030002l   //ro pDBINAME , Driver type
#define  drvDRIVERVERSION    0x00030003l   //ro UINT16   , Driver version
#define  maxdrvPROPS      2                // keep in sync when adding driver properties

// Database properties
// General
#define  dbMAXPROPS         0x00040000l   //ro UINT16   , Number of defined properties
#define  dbDATABASENAME     0x00040001l   //ro pDBINAME , Database name/alias
#define  dbDATABASETYPE     0x00040002l   //ro pDBINAME , Database type
#define  dbDEFAULTDRIVER    0x00040003l   //rw pDBINAME , Default Driver name
#define  dbPARAMFMTQMARK    0x00040004l   //rw BOOL     , Stmt param marker fmt = ?
#define  dbUSESCHEMAFILE    0x00040005l   //rw BOOL , for text driver only.
#define  maxdbPROPS       16              // keep in sync when adding ANY db properties

// SQL Driver specific
#define  dbASYNCSUPPORT     0x04040000l   //ro BOOL     , Async. qry exec support
#define  dbPROCEDURES       0x04040001l   //ro BOOL     , Stored procedure support
#define  dbDEFAULTTXNISO    0x04040002l   //ro eXILType , Default transaction iso level
#define  dbNATIVEHNDL       0x04040003l   //ro pBYTE    , Native connection handle
#define  dbNATIVEPASSTHRUHNDL 0x04040004l //ro pBYTE    , Native passthru connection handle
#define  dbSERVERVERSION    0x04040005l   //ro UINT16   , Major server version number
#define  dbBATCHCOUNT       0x04040006l   //rw UINT16   , Batch modification count before auto-commit
#define  dbTRACEMODE        0x04040007l   //rw UINT16   , Trace mode
#define  dbCURRENTUSERNAME  0x04040008l   //ro UINT16   , Current User Name
#define  dbOWNERQUALIFIED   0x04040009l   //ro BOOL     , For SQL Link Drivers - does this driver support
#define  dbQUOTECHAR        0x0404000Al   //ro CHAR     , Quote character for quoting Object Names

// Session properties
// General
#define  sesMAXPROPS         0x00020000l   //ro UINT16   , Number of defined properties
#define  sesSESSIONNAME      0x00020001l   //ro pDBINAME , Name of seesion
#define  sesNETFILE          0x00020002l   //rw pCHAR    , Full filename of netfile (MAXPATHLEN)
#define  sesCFGMODE          0x00020003l   //rw CFGMode, Mode of configuration file.
#define  sesDEFAULTDRIVER    0x00020004l   //rw pDBINAME, default driver name
#define  sesGROUPNAME        0x00020005l   //rw pCHAR, Security - user group name (dBASE)
#define  sesUSERNAME         0x00020006l   //rw pCHAR, User Name
#define  sesUSERPASSWORD     0x00020007l   //rw pCHAR, User password
#define  sesSECFILENAME      0x00020008l   //rw pCHAR, Location of dBASE Security file
#define  sesDRNAME           0x00020009l   //rw pCHAR, Repository Database Name
#define  maxsesPROPS      9                // keep in sync when adding session properties

// System properties
// General
#define   sysMAXPROPS        0x00010000l   // ro UINT16  , Number of defined properties
#define   sysLOWMEMUSAGE     0x00010001l   // ro UINT16  , Low memory usage in (k)
#define   maxsysPROPS     1                // keep in sync when adding system properties

// Statement properties
// General
#define  stmtMAXPROPS        0x00060001l   //ro UINT16      Number of defined properties
#define  stmtPARAMETERCOUNT  0x00060002l   //ro UINT16      Count of parameters
#define  stmtPARAMETERDESCS  0x00060003l   //ro aFLDDesc    Array of parameters
#define  stmtLANGDRVNAME     0x00060004l   //ro pCHAR       Symbolic language drv. name
#define  stmtUNIDIRECTIONAL  0x00060010l   //rw BOOL        Cursor Unidirectional
#define  stmtCURSORNAME      0x00060011l   //rw pCHAR       Cursor name
#define  stmtNEWCONNECT      0x00060012l   //rw BOOL        Stmt on new connection
#define  stmtNATIVEHNDL      0x00060013l   //ro pBYTE       Native statement handle
#define  stmtROWCOUNT        0x00060014l   //ro UINT32      Rows effected by a stmt
#define  maxstmtPROPS     31               // keep in sync when adding ANY stmt properties

// specific to QBE or local SQL
#define  stmtANSTYPE         0x00060020l   //rw pBYTE       Table Type of Answer set
#define  stmtLIVENESS        0x00060021l   //rw LIVENESS    Preference for canned/live answers
#define  stmtQRYMODE         0x00060022l   //rw QryEvalMode Execute on server or local or either
#define  stmtBLANKS          0x00060023l   //rw BOOL        True if blanks to be regarded as zeros.
#define  stmtDATEFORMAT      0x00060024l   //rw FMTDate     Date format
#define  stmtNUMBERFORMAT    0x00060025l   //rw FMTNumber   Number format

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -