📄 idapi.h
字号:
// idapi.h - main include file for idapi clients
//
// $Revision: 4.128 $
#ifndef DBI_H
#define DBI_H
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
#define DBIINTFVER 500 // Version of the interface
#define DBIENGVERSION 500 // Version of the engine (3.00)
// assume byte packing throughout
#if ! (defined(lint) || defined(_lint))
# ifndef RC_INVOKED
# if ( _MSC_VER >= 800 ) || (defined(__BORLANDC__) && defined(__FLAT__))
# pragma warning(disable:4103)
# if !(defined( MIDL_PASS )) || defined( __midl )
# pragma pack(push)
# endif
# pragma pack(1)
# elif defined(__BORLANDC__) && !defined(__FLAT__)
# pragma option -a-
# else
# pragma pack(1)
# endif
# endif // ndef RC_INVOKED
#endif // ! (defined(lint) || defined(_lint))
#ifndef NODBITYPES
//-----------------------------------------------------------------------
// DBI types
//-----------------------------------------------------------------------
// sdk debug layer defines
#define DEBUGON 0x1
#define OUTPUTTOFILE 0x2
#define FLUSHEVERYOP 0x8
#define APPENDTOLOG 0x10
// Constants
#define DBIMAXNAMELEN 31 // Name limit (table, field etc)
#define DBIMAXSPNAMELEN 64 // Max stored procedure name length
#define DBIMAXFUNCNAMELEN 255 // Max function name len
#define DBIMAXFLDSINKEY 16 // Max fields in a key
#define DBIMAXKEYEXPLEN 220 // Max Key expression length
#define DBIMAXEXTLEN 3 // Max file extension len, not incl. dot (excluding zero termination)
#if defined(__WIN32__)
#define DBIMAXTBLNAMELEN 260 // Max table name length
#define DBIMAXDRIVELEN 127 // Max drive length
#define DBIMAXPATHLEN 260 // Max path+file name len (excluding zero termination)
#else
#define DBIMAXTBLNAMELEN 127 // Max table name length
#define DBIMAXDRIVELEN 2 // Max drive length
#define DBIMAXPATHLEN 81 // Max path+file name len (excluding zero termination)
#endif // defined(WIN32)
#define DBIMAXMSGLEN 127 // Max message len
#define DBIMAXVCHKLEN 255 // Max val check len
#define DBIMAXPICTLEN 175 // Max picture len
#define DBIMAXFLDSINSEC 256 // Max fields in security spec
#define DBIMAXSCFIELDS 32 // max nbr of fields in a config section
#define DBIMAXSCFLDLEN 128 // max field length
#define DBIMAXSCRECSIZE DBIMAXSCFIELDS*DBIMAXSCFLDLEN // max rec size
#define DBIMAXUSERNAMELEN 14 // Max user name (general)
#define DBIMAXXBUSERNAMELEN 16 // Max user name length (xBASE)
#define DBIMAXBOOKMARKLEN 4104 // Max Bookmark length
#define DBIMAXTRACELEN 8192 // Max trace msg len
#define DBIMAXTYPEDESC 127 // Max Type Description size
#define DBIMAXDRSQLSTR 8192 // Max Size of SQL Constraint
#if defined(__FLAT__)
#ifdef FAR
#undef FAR
#endif // FAR
#define FAR
#endif // defined __FLAT__
#ifndef NODBIBASETYPES
#ifndef TRUE
# define TRUE 1
#endif // TRUE
#ifndef FALSE
# define FALSE 0
#endif // FALSE
//For pointers
#ifndef NULL
# define NULL (0)
#endif // NULL
#if defined(__WIN32__) || defined (__NT__)
#if !defined(VOID)
#define VOID void
typedef char CHAR; // from winnt.h
typedef short SHORT;
typedef long LONG;
#endif
#else
#if !defined(VOID)
#define VOID void
#endif // !defined(VOID)
typedef char CHAR; // from windows.h
#endif // defined(WIN32) && !defined(VOID)
#ifndef _WINDEF_
typedef unsigned char BYTE;
#endif
#ifndef INT8
# define INT8 char
#endif // INT8
#ifndef UINT8
# define UINT8 unsigned char
#endif // UINT8
#ifndef INT16
#if defined(__FLAT__)
# define INT16 short
#else
# define INT16 int
#endif // defined(__FLAT__)
#endif // INT16
#ifndef UINT16
#if defined(__FLAT__)
# define UINT16 unsigned short
#else
# define UINT16 unsigned int
#endif // defined(__FLAT__)
#endif // UINT16
#ifndef INT32
# define INT32 long
#endif // INT32
#ifndef UINT32
# define UINT32 unsigned long
#endif // UINT32
#ifndef BOOL
typedef int BOOL; // from windows.h
#endif
typedef unsigned char BOOL8;
typedef short BOOL16;
#endif // NODBIBASETYPES
typedef double DFLOAT;
typedef long DBIDATE;
typedef long TIME;
typedef double TIMESTAMP;
typedef UINT32 hDBICfg;
typedef VOID FAR *pVOID;
typedef pVOID FAR *ppVOID;
typedef CHAR FAR *pCHAR;
typedef const CHAR FAR *pCCHAR;
typedef BYTE FAR *pBYTE;
typedef INT8 FAR *pINT8;
typedef UINT8 FAR *pUINT8;
typedef INT16 FAR *pINT16;
typedef UINT16 FAR *pUINT16;
typedef INT32 FAR *pINT32;
typedef UINT32 FAR *pUINT32;
typedef DFLOAT FAR *pDFLOAT;
typedef DBIDATE FAR *pDBIDATE;
typedef TIME FAR *pTIME;
typedef BOOL FAR *pBOOL;
typedef BOOL16 FAR *pBOOL16;
typedef TIMESTAMP FAR *pTIMESTAMP;
#if !defined(__WIN32__) || (defined(__WATCOMC__) && !defined (__NT__))
#define FLOAT DFLOAT // for compatibility with BDE 2.0
#define pFLOAT pDFLOAT
#define DATE DBIDATE
#define pDATE pDBIDATE
#endif // WIN32
typedef pBYTE FAR *ppBYTE;
typedef pCHAR FAR *ppCHAR;
typedef pBOOL FAR *ppBOOL;
typedef pBOOL16 FAR *ppBOOL16;
typedef hDBICfg FAR *phDBICfg;
// Constants
//===========================================================================
// G e n e r a l
//===========================================================================
#if defined(__FLAT__)
#define DBIFN __stdcall // All functions are this type
#else
#define DBIFN PASCAL FAR // All functions are this type
#endif // define(__FLAT__)
typedef UINT16 DBIResult; // Function result
typedef DBIResult FAR *pDBIResult; // Function result pointer
typedef UINT32 hDBIObj; // Generic object handle
typedef hDBIObj hDBIDb; // Database handle
typedef hDBIObj hDBIQry; // Query handle
typedef hDBIObj hDBIStmt; // Statement handle ("new query")
typedef hDBIObj hDBICur; // Cursor handle
typedef hDBIObj hDBISes; // Session handle
typedef hDBIObj hDBIXlt; // Translation handle
typedef hDBIObj FAR *phDBIObj; // pointer to generic object handle
typedef hDBIDb FAR *phDBIDb; // pointer to Database handle
typedef hDBIQry FAR *phDBIQry; // pointer to Query handle
typedef hDBIStmt FAR *phDBIStmt; // pointer to Statement handle
typedef hDBICur FAR *phDBICur; // pointer to Cursor handle
typedef hDBISes FAR *phDBISes; // pointer to Session handle
typedef hDBIXlt FAR *phDBIXlt; // pointer to Translation handle
typedef UINT32 hDBIXact; // Transaction handle
typedef hDBIXact FAR *phDBIXact; // pointer to Transaction handle
typedef hDBIObj hDBIDR ; // Handle to a Client Data Repository (CDR) Object
typedef hDBIDR FAR *phDBIDR ; // Ptr to CDR Handle
// typedefs for buffers of various common sizes:
//
typedef CHAR DBIPATH [DBIMAXPATHLEN+1]; // holds a DOS path
typedef CHAR DBINAME [DBIMAXNAMELEN+1]; // holds a name
typedef CHAR DBIEXT [DBIMAXEXTLEN+1]; // holds an extension EXT
typedef CHAR DBIDOTEXT [DBIMAXEXTLEN+2]; // holds an extension EXT including '.'
typedef CHAR DBIDRIVE [DBIMAXDRIVELEN+1]; // holds a drive name
typedef CHAR DBITBLNAME [DBIMAXTBLNAMELEN+1]; // holds a table name
typedef CHAR DBISPNAME [DBIMAXSPNAMELEN+1]; // holds a stored procedure name
typedef CHAR DBIUSERNAME[DBIMAXUSERNAMELEN+1]; // holds a user name
typedef UINT16 DBIKEY [DBIMAXFLDSINKEY]; // holds list of fields in a key
typedef CHAR DBIKEYEXP [DBIMAXKEYEXPLEN+1]; // holds a key expression
typedef BYTE DBIVCHK [DBIMAXVCHKLEN+1]; // holds a validity check
typedef CHAR DBIPICT [DBIMAXPICTLEN+1]; // holds a picture (Pdox)
typedef CHAR DBIMSG [DBIMAXMSGLEN+1]; // holds an error message
typedef CHAR DBIDRTYPEDESC [DBIMAXTYPEDESC+1]; // holds a Type Description string
typedef CHAR DBISQLSTR [DBIMAXDRSQLSTR+1]; // a SQL string
//===========================================================================
// Environmental
//===========================================================================
typedef struct // Struct for defining the environ.
{
DBIPATH szWorkDir; // Working directory
DBIPATH szIniFile; // Configuration file
BOOL16 bForceLocalInit; // Force local initialization
DBINAME szLang; // System language driver
DBINAME szClientName; // Client name (documentary)
} DBIEnv;
typedef DBIEnv FAR *pDBIEnv;
//============================================================================
// System Info
//============================================================================
typedef struct // System Version Info
{
UINT16 iVersion; // Engine version
UINT16 iIntfLevel; // Client Interface level
DBIDATE dateVer; // Version date (Compile/Release)
TIME timeVer; // Version time (Compile/Release)
#if defined(__WIN32__)
CHAR szVersion[20]; // Version name (xxx.xxx.xxx.xxx)
#endif
} SYSVersion;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -