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