source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/odbcinst.h@ 1194

Last change on this file since 1194 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 9.2 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __ODBCINST_H
7#define __ODBCINST_H
8
9#include <sql.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#ifndef ODBCVER
16#define ODBCVER 0x0351
17#endif
18
19#define ODBC_ADD_DSN 1
20#define ODBC_CONFIG_DSN 2
21#define ODBC_REMOVE_DSN 3
22
23#if (ODBCVER >= 0x0250)
24#define ODBC_ADD_SYS_DSN 4
25#define ODBC_CONFIG_SYS_DSN 5
26#define ODBC_REMOVE_SYS_DSN 6
27#if (ODBCVER >= 0x0300)
28#define ODBC_REMOVE_DEFAULT_DSN 7
29#endif
30
31#define ODBC_INSTALL_INQUIRY 1
32#define ODBC_INSTALL_COMPLETE 2
33
34#define ODBC_INSTALL_DRIVER 1
35#define ODBC_REMOVE_DRIVER 2
36#define ODBC_CONFIG_DRIVER 3
37#define ODBC_CONFIG_DRIVER_MAX 100
38#endif
39
40#if (ODBCVER >= 0x0300)
41#define ODBC_BOTH_DSN 0
42#define ODBC_USER_DSN 1
43#define ODBC_SYSTEM_DSN 2
44#endif
45
46#if (ODBCVER >= 0x0300)
47#define ODBC_ERROR_GENERAL_ERR 1
48#define ODBC_ERROR_INVALID_BUFF_LEN 2
49#define ODBC_ERROR_INVALID_HWND 3
50#define ODBC_ERROR_INVALID_STR 4
51#define ODBC_ERROR_INVALID_REQUEST_TYPE 5
52#define ODBC_ERROR_COMPONENT_NOT_FOUND 6
53#define ODBC_ERROR_INVALID_NAME 7
54#define ODBC_ERROR_INVALID_KEYWORD_VALUE 8
55#define ODBC_ERROR_INVALID_DSN 9
56#define ODBC_ERROR_INVALID_INF 10
57#define ODBC_ERROR_REQUEST_FAILED 11
58#define ODBC_ERROR_INVALID_PATH 12
59#define ODBC_ERROR_LOAD_LIB_FAILED 13
60#define ODBC_ERROR_INVALID_PARAM_SEQUENCE 14
61#define ODBC_ERROR_INVALID_LOG_FILE 15
62#define ODBC_ERROR_USER_CANCELED 16
63#define ODBC_ERROR_USAGE_UPDATE_FAILED 17
64#define ODBC_ERROR_CREATE_DSN_FAILED 18
65#define ODBC_ERROR_WRITING_SYSINFO_FAILED 19
66#define ODBC_ERROR_REMOVE_DSN_FAILED 20
67#define ODBC_ERROR_OUT_OF_MEM 21
68#define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22
69#endif
70
71#ifndef EXPORT
72#define EXPORT
73#endif
74
75#ifndef RC_INVOKED
76
77#ifndef WINAPI
78#if defined(_ARM_)
79#define WINAPI
80#else
81#define WINAPI __stdcall
82#endif
83#endif
84
85#define INSTAPI WINAPI
86
87 WINBOOL WINAPI SQLInstallODBC(HWND hwndParent,LPCSTR lpszInfFile,LPCSTR lpszSrcPath,LPCSTR lpszDrivers);
88 WINBOOL WINAPI SQLManageDataSources(HWND hwndParent);
89 WINBOOL WINAPI SQLCreateDataSource(HWND hwndParent,LPCSTR lpszDSN);
90 WINBOOL WINAPI SQLGetTranslator(HWND hwnd,LPSTR lpszName,WORD cbNameMax,WORD *pcbNameOut,LPSTR lpszPath,WORD cbPathMax,WORD *pcbPathOut,DWORD *pvOption);
91 WINBOOL WINAPI SQLInstallDriver(LPCSTR lpszInfFile,LPCSTR lpszDriver,LPSTR lpszPath,WORD cbPathMax,WORD *pcbPathOut);
92 WINBOOL WINAPI SQLInstallDriverManager (LPSTR lpszPath,WORD cbPathMax,WORD *pcbPathOut);
93 WINBOOL WINAPI SQLGetInstalledDrivers (LPSTR lpszBuf,WORD cbBufMax,WORD *pcbBufOut);
94 WINBOOL WINAPI SQLGetAvailableDrivers(LPCSTR lpszInfFile,LPSTR lpszBuf,WORD cbBufMax,WORD *pcbBufOut);
95 WINBOOL WINAPI SQLConfigDataSource(HWND hwndParent,WORD fRequest,LPCSTR lpszDriver,LPCSTR lpszAttributes);
96 WINBOOL WINAPI SQLRemoveDefaultDataSource(void);
97 WINBOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN,LPCSTR lpszDriver);
98 WINBOOL WINAPI SQLRemoveDSNFromIni(LPCSTR lpszDSN);
99 WINBOOL WINAPI SQLValidDSN(LPCSTR lpszDSN);
100 WINBOOL WINAPI SQLWritePrivateProfileString(LPCSTR lpszSection,LPCSTR lpszEntry,LPCSTR lpszString,LPCSTR lpszFilename);
101 int WINAPI SQLGetPrivateProfileString(LPCSTR lpszSection,LPCSTR lpszEntry,LPCSTR lpszDefault,LPSTR lpszRetBuffer,int cbRetBuffer,LPCSTR lpszFilename);
102#if (ODBCVER >= 0x0250)
103 WINBOOL WINAPI SQLRemoveDriverManager(LPDWORD lpdwUsageCount);
104 WINBOOL WINAPI SQLInstallTranslator(LPCSTR lpszInfFile,LPCSTR lpszTranslator,LPCSTR lpszPathIn,LPSTR lpszPathOut,WORD cbPathOutMax,WORD *pcbPathOut,WORD fRequest,LPDWORD lpdwUsageCount);
105 WINBOOL WINAPI SQLRemoveTranslator(LPCSTR lpszTranslator,LPDWORD lpdwUsageCount);
106 WINBOOL WINAPI SQLRemoveDriver(LPCSTR lpszDriver,WINBOOL fRemoveDSN,LPDWORD lpdwUsageCount);
107 WINBOOL WINAPI SQLConfigDriver(HWND hwndParent,WORD fRequest,LPCSTR lpszDriver,LPCSTR lpszArgs,LPSTR lpszMsg,WORD cbMsgMax,WORD *pcbMsgOut);
108#endif
109
110#if (ODBCVER >= 0x0300)
111 SQLRETURN WINAPI SQLInstallerError(WORD iError,DWORD *pfErrorCode,LPSTR lpszErrorMsg,WORD cbErrorMsgMax,WORD *pcbErrorMsg);
112 SQLRETURN WINAPI SQLPostInstallerError(DWORD dwErrorCode,LPCSTR lpszErrMsg);
113 WINBOOL WINAPI SQLWriteFileDSN(LPCSTR lpszFileName,LPCSTR lpszAppName,LPCSTR lpszKeyName,LPCSTR lpszString);
114 WINBOOL WINAPI SQLReadFileDSN(LPCSTR lpszFileName,LPCSTR lpszAppName,LPCSTR lpszKeyName,LPSTR lpszString,WORD cbString,WORD *pcbString);
115 WINBOOL WINAPI SQLInstallDriverEx(LPCSTR lpszDriver,LPCSTR lpszPathIn,LPSTR lpszPathOut,WORD cbPathOutMax,WORD *pcbPathOut,WORD fRequest,LPDWORD lpdwUsageCount);
116 WINBOOL WINAPI SQLInstallTranslatorEx(LPCSTR lpszTranslator,LPCSTR lpszPathIn,LPSTR lpszPathOut,WORD cbPathOutMax,WORD *pcbPathOut,WORD fRequest,LPDWORD lpdwUsageCount);
117 WINBOOL WINAPI SQLGetConfigMode(UWORD *pwConfigMode);
118 WINBOOL WINAPI SQLSetConfigMode(UWORD wConfigMode);
119#endif
120
121 WINBOOL WINAPI ConfigDSN(HWND hwndParent,WORD fRequest,LPCSTR lpszDriver,LPCSTR lpszAttributes);
122 WINBOOL WINAPI ConfigTranslator(HWND hwndParent,DWORD *pvOption);
123#if (ODBCVER >= 0x0250)
124 WINBOOL WINAPI ConfigDriver(HWND hwndParent,WORD fRequest,LPCSTR lpszDriver,LPCSTR lpszArgs,LPSTR lpszMsg,WORD cbMsgMax,WORD *pcbMsgOut);
125#endif
126 WINBOOL WINAPI SQLInstallODBCW(HWND hwndParent,LPCWSTR lpszInfFile,LPCWSTR lpszSrcPath,LPCWSTR lpszDrivers);
127 WINBOOL WINAPI SQLCreateDataSourceW(HWND hwndParent,LPCWSTR lpszDSN);
128 WINBOOL WINAPI SQLGetTranslatorW(HWND hwnd,LPWSTR lpszName,WORD cbNameMax,WORD *pcbNameOut,LPWSTR lpszPath,WORD cbPathMax,WORD *pcbPathOut,DWORD *pvOption);
129 WINBOOL WINAPI SQLInstallDriverW (LPCWSTR lpszInfFile,LPCWSTR lpszDriver,LPWSTR lpszPath,WORD cbPathMax,WORD *pcbPathOut);
130 WINBOOL WINAPI SQLInstallDriverManagerW (LPWSTR lpszPath,WORD cbPathMax,WORD *pcbPathOut);
131 WINBOOL WINAPI SQLGetInstalledDriversW (LPWSTR lpszBuf,WORD cbBufMax,WORD *pcbBufOut);
132 WINBOOL WINAPI SQLGetAvailableDriversW (LPCWSTR lpszInfFile,LPWSTR lpszBuf,WORD cbBufMax,WORD *pcbBufOut);
133 WINBOOL WINAPI SQLConfigDataSourceW(HWND hwndParent,WORD fRequest,LPCWSTR lpszDriver,LPCWSTR lpszAttributes);
134 WINBOOL WINAPI SQLWriteDSNToIniW (LPCWSTR lpszDSN,LPCWSTR lpszDriver);
135 WINBOOL WINAPI SQLRemoveDSNFromIniW (LPCWSTR lpszDSN);
136 WINBOOL WINAPI SQLValidDSNW (LPCWSTR lpszDSN);
137 WINBOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection,LPCWSTR lpszEntry,LPCWSTR lpszString,LPCWSTR lpszFilename);
138 int WINAPI SQLGetPrivateProfileStringW(LPCWSTR lpszSection,LPCWSTR lpszEntry,LPCWSTR lpszDefault,LPWSTR lpszRetBuffer,int cbRetBuffer,LPCWSTR lpszFilename);
139#if (ODBCVER >= 0x0250)
140 WINBOOL WINAPI SQLInstallTranslatorW(LPCWSTR lpszInfFile,LPCWSTR lpszTranslator,LPCWSTR lpszPathIn,LPWSTR lpszPathOut,WORD cbPathOutMax,WORD *pcbPathOut,WORD fRequest,LPDWORD lpdwUsageCount);
141 WINBOOL WINAPI SQLRemoveTranslatorW(LPCWSTR lpszTranslator,LPDWORD lpdwUsageCount);
142 WINBOOL WINAPI SQLRemoveDriverW(LPCWSTR lpszDriver,WINBOOL fRemoveDSN,LPDWORD lpdwUsageCount);
143 WINBOOL WINAPI SQLConfigDriverW(HWND hwndParent,WORD fRequest,LPCWSTR lpszDriver,LPCWSTR lpszArgs,LPWSTR lpszMsg,WORD cbMsgMax,WORD *pcbMsgOut);
144#endif
145#if (ODBCVER >= 0x0300)
146 SQLRETURN WINAPI SQLInstallerErrorW(WORD iError,DWORD *pfErrorCode,LPWSTR lpszErrorMsg,WORD cbErrorMsgMax,WORD *pcbErrorMsg);
147 SQLRETURN WINAPI SQLPostInstallerErrorW(DWORD dwErrorCode,LPCWSTR lpszErrorMsg);
148 WINBOOL WINAPI SQLWriteFileDSNW(LPCWSTR lpszFileName,LPCWSTR lpszAppName,LPCWSTR lpszKeyName,LPCWSTR lpszString);
149 WINBOOL WINAPI SQLReadFileDSNW(LPCWSTR lpszFileName,LPCWSTR lpszAppName,LPCWSTR lpszKeyName,LPWSTR lpszString,WORD cbString,WORD *pcbString);
150 WINBOOL WINAPI SQLInstallDriverExW(LPCWSTR lpszDriver,LPCWSTR lpszPathIn,LPWSTR lpszPathOut,WORD cbPathOutMax,WORD *pcbPathOut,WORD fRequest,LPDWORD lpdwUsageCount);
151 WINBOOL WINAPI SQLInstallTranslatorExW(LPCWSTR lpszTranslator,LPCWSTR lpszPathIn,LPWSTR lpszPathOut,WORD cbPathOutMax,WORD *pcbPathOut,WORD fRequest,LPDWORD lpdwUsageCount);
152#endif
153
154 WINBOOL WINAPI ConfigDSNW(HWND hwndParent,WORD fRequest,LPCWSTR lpszDriver,LPCWSTR lpszAttributes);
155
156#if (ODBCVER >= 0x0250)
157 WINBOOL WINAPI ConfigDriverW(HWND hwndParent,WORD fRequest,LPCWSTR lpszDriver,LPCWSTR lpszArgs,LPWSTR lpszMsg,WORD cbMsgMax,WORD *pcbMsgOut);
158#endif
159
160#ifndef SQL_NOUNICODEMAP
161
162#if defined(UNICODE)
163#define SQLInstallODBC SQLInstallODBCW
164#define SQLCreateDataSource SQLCreateDataSourceW
165#define SQLGetTranslator SQLGetTranslatorW
166#define SQLInstallDriver SQLInstallDriverW
167#define SQLInstallDriverManager SQLInstallDriverManagerW
168#define SQLGetInstalledDrivers SQLGetInstalledDriversW
169#define SQLGetAvailableDrivers SQLGetAvailableDriversW
170#define SQLConfigDataSource SQLConfigDataSourceW
171#define SQLWriteDSNToIni SQLWriteDSNToIniW
172#define SQLRemoveDSNFromIni SQLRemoveDSNFromIniW
173#define SQLValidDSN SQLValidDSNW
174#define SQLWritePrivateProfileString SQLWritePrivateProfileStringW
175#define SQLGetPrivateProfileString SQLGetPrivateProfileStringW
176#define SQLInstallTranslator SQLInstallTranslatorW
177#define SQLRemoveTranslator SQLRemoveTranslatorW
178#define SQLRemoveDriver SQLRemoveDriverW
179#define SQLConfigDriver SQLConfigDriverW
180#define SQLInstallerError SQLInstallerErrorW
181#define SQLPostInstallerError SQLPostInstallerErrorW
182#define SQLReadFileDSN SQLReadFileDSNW
183#define SQLWriteFileDSN SQLWriteFileDSNW
184#define SQLInstallDriverEx SQLInstallDriverExW
185#define SQLInstallTranslatorEx SQLInstallTranslatorExW
186#endif
187
188#endif
189#endif
190
191#ifdef __cplusplus
192}
193#endif
194#endif
Note: See TracBrowser for help on using the repository browser.