source: Daodan/MinGW/include/odbcinst.h@ 1111

Last change on this file since 1111 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 6.3 KB
RevLine 
[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
8extern "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
58BOOL INSTAPI ConfigDSN(HWND,WORD,LPCSTR,LPCSTR);
59BOOL INSTAPI ConfigDSNW(HWND,WORD,LPCWSTR,LPCWSTR);
60BOOL INSTAPI ConfigTranslator(HWND,DWORD*);
61BOOL INSTAPI SQLConfigDataSource(HWND,WORD,LPCSTR,LPCSTR);
62BOOL INSTAPI SQLConfigDataSourceW(HWND,WORD,LPCWSTR,LPCWSTR);
63BOOL INSTAPI SQLCreateDataSource(HWND,LPCSTR);
64BOOL INSTAPI SQLCreateDataSourceW(HWND,LPCWSTR);
65BOOL INSTAPI SQLGetAvailableDrivers(LPCSTR,LPSTR,WORD,WORD*);
66BOOL INSTAPI SQLGetAvailableDriversW(LPCWSTR,LPWSTR,WORD,WORD*);
67BOOL INSTAPI SQLGetInstalledDrivers(LPSTR,WORD,WORD*);
68BOOL INSTAPI SQLGetInstalledDriversW(LPWSTR,WORD,WORD*);
69int INSTAPI SQLGetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,int,LPCSTR);
70int INSTAPI SQLGetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,int,LPCWSTR);
71BOOL INSTAPI SQLGetTranslator(HWND,LPSTR,WORD,WORD*,LPSTR,WORD,WORD*,DWORD*);
72BOOL INSTAPI SQLGetTranslatorW(HWND,LPWSTR,WORD,WORD*,LPWSTR,WORD,WORD*,DWORD*);
73BOOL INSTAPI SQLInstallDriver(LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
74BOOL INSTAPI SQLInstallDriverManager(LPSTR,WORD,WORD*);
75BOOL INSTAPI SQLInstallDriverManagerW(LPWSTR,WORD,WORD*);
76BOOL INSTAPI SQLInstallDriverW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
77BOOL INSTAPI SQLInstallODBC(HWND,LPCSTR,LPCSTR,LPCSTR);
78BOOL INSTAPI SQLInstallODBCW(HWND,LPCWSTR,LPCWSTR,LPCWSTR);
79BOOL INSTAPI SQLManageDataSources(HWND);
80BOOL INSTAPI SQLRemoveDefaultDataSource(void);
81BOOL INSTAPI SQLRemoveDSNFromIni(LPCSTR);
82BOOL INSTAPI SQLRemoveDSNFromIniW(LPCWSTR);
83BOOL INSTAPI SQLValidDSN(LPCSTR);
84BOOL INSTAPI SQLValidDSNW(LPCWSTR);
85BOOL INSTAPI SQLWriteDSNToIni(LPCSTR,LPCSTR);
86BOOL INSTAPI SQLWriteDSNToIniW(LPCWSTR,LPCWSTR);
87BOOL INSTAPI SQLWritePrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
88BOOL INSTAPI SQLWritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
89#if(ODBCVER >= 0x0250)
90BOOL INSTAPI ConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
91BOOL INSTAPI ConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
92BOOL INSTAPI SQLConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
93BOOL INSTAPI SQLConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
94BOOL INSTAPI SQLInstallTranslator(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
95BOOL INSTAPI SQLInstallTranslatorW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
96BOOL INSTAPI SQLRemoveDriver(LPCSTR,BOOL,LPDWORD);
97BOOL INSTAPI SQLRemoveDriverManager(LPDWORD);
98BOOL INSTAPI SQLRemoveDriverW(LPCWSTR,BOOL,LPDWORD);
99BOOL INSTAPI SQLRemoveTranslator(LPCSTR,LPDWORD);
100BOOL INSTAPI SQLRemoveTranslatorW(LPCWSTR,LPDWORD);
101#endif /* ODBCVER >= 0x0250 */
102#if (ODBCVER >= 0x0300)
103BOOL INSTAPI SQLGetConfigMode(UWORD*);
104BOOL INSTAPI SQLInstallDriverEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
105BOOL INSTAPI SQLInstallDriverExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
106SQLRETURN INSTAPI SQLInstallerError(WORD,DWORD*,LPSTR,WORD,WORD*);
107SQLRETURN INSTAPI SQLInstallerErrorW(WORD,DWORD*,LPWSTR,WORD,WORD*);
108BOOL INSTAPI SQLInstallTranslatorEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
109BOOL INSTAPI SQLInstallTranslatorExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
110SQLRETURN INSTAPI SQLPostInstallerError(DWORD,LPCSTR);
111SQLRETURN INSTAPI SQLPostInstallerErrorW(DWORD,LPCWSTR);
112BOOL INSTAPI SQLReadFileDSN(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
113BOOL INSTAPI SQLReadFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
114BOOL INSTAPI SQLSetConfigMode(UWORD);
115BOOL INSTAPI SQLWriteFileDSN(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
116BOOL 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 */
Note: See TracBrowser for help on using the repository browser.