[1046] | 1 | #ifndef _ODBCINST_H
|
---|
| 2 | #define _ODBCINST_H
|
---|
| 3 | #if __GNUC__ >=3
|
---|
| 4 | #pragma GCC system_header
|
---|
| 5 | #endif
|
---|
| 6 | #include <sql.h>
|
---|
| 7 | #ifdef __cplusplus
|
---|
| 8 | extern "C" {
|
---|
| 9 | #endif
|
---|
| 10 | #ifndef ODBCVER
|
---|
| 11 | #define ODBCVER 0x0351
|
---|
| 12 | #endif
|
---|
| 13 | #define INSTAPI __stdcall
|
---|
| 14 | #define ODBC_ADD_DSN 1
|
---|
| 15 | #define ODBC_CONFIG_DSN 2
|
---|
| 16 | #define ODBC_REMOVE_DSN 3
|
---|
| 17 | #if (ODBCVER >= 0x0250)
|
---|
| 18 | #define ODBC_ADD_SYS_DSN 4
|
---|
| 19 | #define ODBC_CONFIG_SYS_DSN 5
|
---|
| 20 | #define ODBC_REMOVE_SYS_DSN 6
|
---|
| 21 | #define ODBC_INSTALL_INQUIRY 1
|
---|
| 22 | #define ODBC_INSTALL_COMPLETE 2
|
---|
| 23 | #define ODBC_INSTALL_DRIVER 1
|
---|
| 24 | #define ODBC_REMOVE_DRIVER 2
|
---|
| 25 | #define ODBC_CONFIG_DRIVER 3
|
---|
| 26 | #define ODBC_CONFIG_DRIVER_MAX 100
|
---|
| 27 | #endif /* (ODBCVER >= 0x0250) */
|
---|
| 28 | #if (ODBCVER >= 0x0300)
|
---|
| 29 | #define ODBC_REMOVE_DEFAULT_DSN 7
|
---|
| 30 | #define ODBC_BOTH_DSN 0
|
---|
| 31 | #define ODBC_USER_DSN 1
|
---|
| 32 | #define ODBC_SYSTEM_DSN 2
|
---|
| 33 | #define ODBC_ERROR_GENERAL_ERR 1
|
---|
| 34 | #define ODBC_ERROR_INVALID_BUFF_LEN 2
|
---|
| 35 | #define ODBC_ERROR_INVALID_HWND 3
|
---|
| 36 | #define ODBC_ERROR_INVALID_STR 4
|
---|
| 37 | #define ODBC_ERROR_INVALID_REQUEST_TYPE 5
|
---|
| 38 | #define ODBC_ERROR_COMPONENT_NOT_FOUND 6
|
---|
| 39 | #define ODBC_ERROR_INVALID_NAME 7
|
---|
| 40 | #define ODBC_ERROR_INVALID_KEYWORD_VALUE 8
|
---|
| 41 | #define ODBC_ERROR_INVALID_DSN 9
|
---|
| 42 | #define ODBC_ERROR_INVALID_INF 10
|
---|
| 43 | #define ODBC_ERROR_REQUEST_FAILED 11
|
---|
| 44 | #define ODBC_ERROR_INVALID_PATH 12
|
---|
| 45 | #define ODBC_ERROR_LOAD_LIB_FAILED 13
|
---|
| 46 | #define ODBC_ERROR_INVALID_PARAM_SEQUENCE 14
|
---|
| 47 | #define ODBC_ERROR_INVALID_LOG_FILE 15
|
---|
| 48 | #define ODBC_ERROR_USER_CANCELED 16
|
---|
| 49 | #define ODBC_ERROR_USAGE_UPDATE_FAILED 17
|
---|
| 50 | #define ODBC_ERROR_CREATE_DSN_FAILED 18
|
---|
| 51 | #define ODBC_ERROR_WRITING_SYSINFO_FAILED 19
|
---|
| 52 | #define ODBC_ERROR_REMOVE_DSN_FAILED 20
|
---|
| 53 | #define ODBC_ERROR_OUT_OF_MEM 21
|
---|
| 54 | #define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22
|
---|
| 55 | #endif /* ODBCVER >= 0x0300 */
|
---|
| 56 |
|
---|
| 57 | #ifndef RC_INVOKED
|
---|
| 58 | BOOL INSTAPI ConfigDSN(HWND,WORD,LPCSTR,LPCSTR);
|
---|
| 59 | BOOL INSTAPI ConfigDSNW(HWND,WORD,LPCWSTR,LPCWSTR);
|
---|
| 60 | BOOL INSTAPI ConfigTranslator(HWND,DWORD*);
|
---|
| 61 | BOOL INSTAPI SQLConfigDataSource(HWND,WORD,LPCSTR,LPCSTR);
|
---|
| 62 | BOOL INSTAPI SQLConfigDataSourceW(HWND,WORD,LPCWSTR,LPCWSTR);
|
---|
| 63 | BOOL INSTAPI SQLCreateDataSource(HWND,LPCSTR);
|
---|
| 64 | BOOL INSTAPI SQLCreateDataSourceW(HWND,LPCWSTR);
|
---|
| 65 | BOOL INSTAPI SQLGetAvailableDrivers(LPCSTR,LPSTR,WORD,WORD*);
|
---|
| 66 | BOOL INSTAPI SQLGetAvailableDriversW(LPCWSTR,LPWSTR,WORD,WORD*);
|
---|
| 67 | BOOL INSTAPI SQLGetInstalledDrivers(LPSTR,WORD,WORD*);
|
---|
| 68 | BOOL INSTAPI SQLGetInstalledDriversW(LPWSTR,WORD,WORD*);
|
---|
| 69 | int INSTAPI SQLGetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,int,LPCSTR);
|
---|
| 70 | int INSTAPI SQLGetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,int,LPCWSTR);
|
---|
| 71 | BOOL INSTAPI SQLGetTranslator(HWND,LPSTR,WORD,WORD*,LPSTR,WORD,WORD*,DWORD*);
|
---|
| 72 | BOOL INSTAPI SQLGetTranslatorW(HWND,LPWSTR,WORD,WORD*,LPWSTR,WORD,WORD*,DWORD*);
|
---|
| 73 | BOOL INSTAPI SQLInstallDriver(LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
---|
| 74 | BOOL INSTAPI SQLInstallDriverManager(LPSTR,WORD,WORD*);
|
---|
| 75 | BOOL INSTAPI SQLInstallDriverManagerW(LPWSTR,WORD,WORD*);
|
---|
| 76 | BOOL INSTAPI SQLInstallDriverW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
---|
| 77 | BOOL INSTAPI SQLInstallODBC(HWND,LPCSTR,LPCSTR,LPCSTR);
|
---|
| 78 | BOOL INSTAPI SQLInstallODBCW(HWND,LPCWSTR,LPCWSTR,LPCWSTR);
|
---|
| 79 | BOOL INSTAPI SQLManageDataSources(HWND);
|
---|
| 80 | BOOL INSTAPI SQLRemoveDefaultDataSource(void);
|
---|
| 81 | BOOL INSTAPI SQLRemoveDSNFromIni(LPCSTR);
|
---|
| 82 | BOOL INSTAPI SQLRemoveDSNFromIniW(LPCWSTR);
|
---|
| 83 | BOOL INSTAPI SQLValidDSN(LPCSTR);
|
---|
| 84 | BOOL INSTAPI SQLValidDSNW(LPCWSTR);
|
---|
| 85 | BOOL INSTAPI SQLWriteDSNToIni(LPCSTR,LPCSTR);
|
---|
| 86 | BOOL INSTAPI SQLWriteDSNToIniW(LPCWSTR,LPCWSTR);
|
---|
| 87 | BOOL INSTAPI SQLWritePrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
---|
| 88 | BOOL INSTAPI SQLWritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
---|
| 89 | #if(ODBCVER >= 0x0250)
|
---|
| 90 | BOOL INSTAPI ConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
---|
| 91 | BOOL INSTAPI ConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
---|
| 92 | BOOL INSTAPI SQLConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
---|
| 93 | BOOL INSTAPI SQLConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
---|
| 94 | BOOL INSTAPI SQLInstallTranslator(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
|
---|
| 95 | BOOL INSTAPI SQLInstallTranslatorW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
|
---|
| 96 | BOOL INSTAPI SQLRemoveDriver(LPCSTR,BOOL,LPDWORD);
|
---|
| 97 | BOOL INSTAPI SQLRemoveDriverManager(LPDWORD);
|
---|
| 98 | BOOL INSTAPI SQLRemoveDriverW(LPCWSTR,BOOL,LPDWORD);
|
---|
| 99 | BOOL INSTAPI SQLRemoveTranslator(LPCSTR,LPDWORD);
|
---|
| 100 | BOOL INSTAPI SQLRemoveTranslatorW(LPCWSTR,LPDWORD);
|
---|
| 101 | #endif /* ODBCVER >= 0x0250 */
|
---|
| 102 | #if (ODBCVER >= 0x0300)
|
---|
| 103 | BOOL INSTAPI SQLGetConfigMode(UWORD*);
|
---|
| 104 | BOOL INSTAPI SQLInstallDriverEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
|
---|
| 105 | BOOL INSTAPI SQLInstallDriverExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
|
---|
| 106 | SQLRETURN INSTAPI SQLInstallerError(WORD,DWORD*,LPSTR,WORD,WORD*);
|
---|
| 107 | SQLRETURN INSTAPI SQLInstallerErrorW(WORD,DWORD*,LPWSTR,WORD,WORD*);
|
---|
| 108 | BOOL INSTAPI SQLInstallTranslatorEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
|
---|
| 109 | BOOL INSTAPI SQLInstallTranslatorExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
|
---|
| 110 | SQLRETURN INSTAPI SQLPostInstallerError(DWORD,LPCSTR);
|
---|
| 111 | SQLRETURN INSTAPI SQLPostInstallerErrorW(DWORD,LPCWSTR);
|
---|
| 112 | BOOL INSTAPI SQLReadFileDSN(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
|
---|
| 113 | BOOL INSTAPI SQLReadFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
|
---|
| 114 | BOOL INSTAPI SQLSetConfigMode(UWORD);
|
---|
| 115 | BOOL INSTAPI SQLWriteFileDSN(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
|
---|
| 116 | BOOL INSTAPI SQLWriteFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
|
---|
| 117 | #endif /* ODBCVER >= 0x0300 */
|
---|
| 118 |
|
---|
| 119 | #if defined (UNICODE) && !defined (SQL_NOUNICODEMAP)
|
---|
| 120 | #define SQLConfigDataSource SQLConfigDataSourceW
|
---|
| 121 | #define SQLConfigDriver SQLConfigDriverW
|
---|
| 122 | #define SQLCreateDataSource SQLCreateDataSourceW
|
---|
| 123 | #define SQLGetAvailableDrivers SQLGetAvailableDriversW
|
---|
| 124 | #define SQLGetInstalledDrivers SQLGetInstalledDriversW
|
---|
| 125 | #define SQLGetPrivateProfileString SQLGetPrivateProfileStringW
|
---|
| 126 | #define SQLGetTranslator SQLGetTranslatorW
|
---|
| 127 | #define SQLInstallDriver SQLInstallDriverW
|
---|
| 128 | #define SQLInstallDriverEx SQLInstallDriverExW
|
---|
| 129 | #define SQLInstallDriverManager SQLInstallDriverManagerW
|
---|
| 130 | #define SQLInstallerError SQLInstallerErrorW
|
---|
| 131 | #define SQLInstallODBC SQLInstallODBCW
|
---|
| 132 | #define SQLInstallTranslator SQLInstallTranslatorW
|
---|
| 133 | #define SQLInstallTranslatorEx SQLInstallTranslatorExW
|
---|
| 134 | #define SQLPostInstallerError SQLPostInstallerErrorW
|
---|
| 135 | #define SQLReadFileDSN SQLReadFileDSNW
|
---|
| 136 | #define SQLRemoveDriver SQLRemoveDriverW
|
---|
| 137 | #define SQLRemoveDSNFromIni SQLRemoveDSNFromIniW
|
---|
| 138 | #define SQLRemoveTranslator SQLRemoveTranslatorW
|
---|
| 139 | #define SQLValidDSN SQLValidDSNW
|
---|
| 140 | #define SQLWriteDSNToIni SQLWriteDSNToIniW
|
---|
| 141 | #define SQLWriteFileDSN SQLWriteFileDSNW
|
---|
| 142 | #define SQLWritePrivateProfileString SQLWritePrivateProfileStringW
|
---|
| 143 | #endif /* UNICODE && !SQL_NOUNICODEMAP */
|
---|
| 144 | #endif /* RC_INVOKED */
|
---|
| 145 | #ifdef __cplusplus
|
---|
| 146 | }
|
---|
| 147 | #endif
|
---|
| 148 | #endif /* _ODBCINST_H */
|
---|