83 #define ODBCVER 0x0351
91 #define ODBC_ADD_DSN 1
92 #define ODBC_CONFIG_DSN 2
93 #define ODBC_REMOVE_DSN 3
95 #if (ODBCVER >= 0x0250)
96 #define ODBC_ADD_SYS_DSN 4
97 #define ODBC_CONFIG_SYS_DSN 5
98 #define ODBC_REMOVE_SYS_DSN 6
99 #if (ODBCVER >= 0x0300)
100 #define ODBC_REMOVE_DEFAULT_DSN 7
104 #define ODBC_INSTALL_INQUIRY 1
105 #define ODBC_INSTALL_COMPLETE 2
108 #define ODBC_INSTALL_DRIVER 1
109 #define ODBC_REMOVE_DRIVER 2
110 #define ODBC_CONFIG_DRIVER 3
111 #define ODBC_CONFIG_DRIVER_MAX 100
115 #if (ODBCVER >= 0x0300)
116 #define ODBC_BOTH_DSN 0
117 #define ODBC_USER_DSN 1
118 #define ODBC_SYSTEM_DSN 2
122 #if (ODBCVER >= 0x0300)
123 #define ODBC_ERROR_GENERAL_ERR 1
124 #define ODBC_ERROR_INVALID_BUFF_LEN 2
125 #define ODBC_ERROR_INVALID_HWND 3
126 #define ODBC_ERROR_INVALID_STR 4
127 #define ODBC_ERROR_INVALID_REQUEST_TYPE 5
128 #define ODBC_ERROR_COMPONENT_NOT_FOUND 6
129 #define ODBC_ERROR_INVALID_NAME 7
130 #define ODBC_ERROR_INVALID_KEYWORD_VALUE 8
131 #define ODBC_ERROR_INVALID_DSN 9
132 #define ODBC_ERROR_INVALID_INF 10
133 #define ODBC_ERROR_REQUEST_FAILED 11
134 #define ODBC_ERROR_INVALID_PATH 12
135 #define ODBC_ERROR_LOAD_LIB_FAILED 13
136 #define ODBC_ERROR_INVALID_PARAM_SEQUENCE 14
137 #define ODBC_ERROR_INVALID_LOG_FILE 15
138 #define ODBC_ERROR_USER_CANCELED 16
139 #define ODBC_ERROR_USAGE_UPDATE_FAILED 17
140 #define ODBC_ERROR_CREATE_DSN_FAILED 18
141 #define ODBC_ERROR_WRITING_SYSINFO_FAILED 19
142 #define ODBC_ERROR_REMOVE_DSN_FAILED 20
143 #define ODBC_ERROR_OUT_OF_MEM 21
144 #define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22
152 #define INSTAPI _System
205 #if HAVE_SQLGETPRIVATEPROFILESTRING
214 #if (ODBCVER >= 0x0250)
238 #if (ODBCVER >= 0x0300)
284 #if (ODBCVER >= 0x0250)
349 #if (ODBCVER >= 0x0250)
372 #if (ODBCVER >= 0x0300)
416 #if (ODBCVER >= 0x0250)
426 #ifndef SQL_NOUNICODEMAP
429 #define SQLInstallODBC SQLInstallODBCW
430 #define SQLCreateDataSource SQLCreateDataSourceW
431 #define SQLGetTranslator SQLGetTranslatorW
432 #define SQLInstallDriver SQLInstallDriverW
433 #define SQLInstallDriverManager SQLInstallDriverManagerW
434 #define SQLGetInstalledDrivers SQLGetInstalledDriversW
435 #define SQLGetAvailableDrivers SQLGetAvailableDriversW
436 #define SQLConfigDataSource SQLConfigDataSourceW
437 #define SQLWriteDSNToIni SQLWriteDSNToIniW
438 #define SQLRemoveDSNFromIni SQLRemoveDSNFromIniW
439 #define SQLValidDSN SQLValidDSNW
440 #define SQLWritePrivateProfileString SQLWritePrivateProfileStringW
441 #define SQLGetPrivateProfileString SQLGetPrivateProfileStringW
442 #define SQLInstallTranslator SQLInstallTranslatorW
443 #define SQLRemoveTranslator SQLRemoveTranslatorW
444 #define SQLRemoveDriver SQLRemoveDriverW
445 #define SQLConfigDriver SQLConfigDriverW
446 #define SQLInstallerError SQLInstallerErrorW
447 #define SQLPostInstallerError SQLPostInstallerErrorW
448 #define SQLReadFileDSN SQLReadFileDSNW
449 #define SQLWriteFileDSN SQLWriteFileDSNW
450 #define SQLInstallDriverEx SQLInstallDriverExW
451 #define SQLInstallTranslatorEx SQLInstallTranslatorExW
#define SQLGetPrivateProfileString
int SQLConfigDataSource(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes)
SQLRETURN SQLInstallerErrorW(WORD iError, DWORD *pfErrorCode, LPWSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg)
struct tODBCINSTWND * HODBCINSTWND
int SQLRemoveDriverW(LPCWSTR lpszDriver, int fRemoveDSN, LPDWORD lpdwUsageCount)
int SQLReadFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPWSTR lpszString, WORD cbString, WORD *pcbString)
int SQLInstallDriverManager(LPSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut)
int SQLWriteFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPCSTR lpszString)
int SQLRemoveDriverManager(LPDWORD lpdwUsageCount)
int SQLCreateDataSourceW(HWND hwndParent, LPCWSTR lpszDSN)
int SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszString, LPCWSTR lpszFilename)
int SQLConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
int SQLGetInstalledDriversW(LPWSTR lpszBuf, WORD cbBufMax, WORD *pcbBufOut)
int SQLRemoveDSNFromIniW(LPCWSTR lpszDSN)
int SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
int SQLGetInstalledDrivers(LPSTR lpszBuf, WORD cbBufMax, WORD *pcbBufOut)
int ConfigDSNW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes)
int SQLRemoveTranslator(LPCSTR lpszTranslator, LPDWORD lpdwUsageCount)
int SQLValidDSNW(LPCWSTR lpszDSN)
int SQLManageDataSources(HWND hwndParent)
int SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName, LPCWSTR lpszKeyName, LPCWSTR lpszString)
int SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
int SQLInstallTranslatorW(LPCWSTR lpszInfFile, LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
int SQLInstallODBCW(HWND hwndParent, LPCWSTR lpszInfFile, LPCWSTR lpszSrcPath, LPCWSTR lpszDrivers)
SQLRETURN SQLPostInstallerError(DWORD dwErrorCode, LPCSTR lpszErrMsg)
int SQLGetAvailableDriversW(LPCWSTR lpszInfFile, LPWSTR lpszBuf, WORD cbBufMax, WORD *pcbBufOut)
int SQLRemoveDriver(LPCSTR lpszDriver, int fRemoveDSN, LPDWORD lpdwUsageCount)
int SQLGetAvailableDrivers(LPCSTR lpszInfFile, LPSTR lpszBuf, WORD cbBufMax, WORD *pcbBufOut)
struct tODBCINSTWND ODBCINSTWND
Our generic window handle.
int SQLValidDSN(LPCSTR lpszDSN)
int ConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
Add or remove an ODBC driver.
int SQLRemoveTranslatorW(LPCWSTR lpszTranslator, LPDWORD lpdwUsageCount)
int SQLInstallDriverEx(LPCSTR lpszDriver, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
int SQLConfigDataSourceW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszAttributes)
int SQLSetConfigMode(UWORD wConfigMode)
SQLRETURN SQLPostInstallerErrorW(DWORD dwErrorCode, LPCWSTR lpszErrorMsg)
int SQLWritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry, LPCSTR lpszString, LPCSTR lpszFilename)
int SQLConfigDriver(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszArgs, LPSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
int SQLInstallTranslatorExW(LPCWSTR lpszTranslator, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
int ConfigDriverW(HWND hwndParent, WORD fRequest, LPCWSTR lpszDriver, LPCWSTR lpszArgs, LPWSTR lpszMsg, WORD cbMsgMax, WORD *pcbMsgOut)
int SQLInstallDriverManagerW(LPWSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut)
int SQLRemoveDSNFromIni(LPCSTR lpszDSN)
int ConfigDSN(HWND hwndParent, WORD fRequest, LPCSTR lpszDriver, LPCSTR lpszAttributes)
Add, remove, or modify a data source.
int SQLCreateDataSource(HWND hwndParent, LPCSTR lpszDSN)
int SQLRemoveDefaultDataSource(void)
int SQLGetPrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry, LPCWSTR lpszDefault, LPWSTR lpszRetBuffer, int cbRetBuffer, LPCWSTR lpszFilename)
int SQLReadFileDSN(LPCSTR lpszFileName, LPCSTR lpszAppName, LPCSTR lpszKeyName, LPSTR lpszString, WORD cbString, WORD *pcbString)
int SQLInstallDriverW(LPCWSTR lpszInfFile, LPCWSTR lpszDriver, LPWSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut)
int SQLInstallTranslator(LPCSTR lpszInfFile, LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
int SQLInstallODBC(HWND hwndParent, LPCSTR lpszInfFile, LPCSTR lpszSrcPath, LPCSTR lpszDrivers)
SQLRETURN SQLInstallerError(WORD iError, DWORD *pfErrorCode, LPSTR lpszErrorMsg, WORD cbErrorMsgMax, WORD *pcbErrorMsg)
int ConfigTranslator(HWND hwndParent, DWORD *pvOption)
int SQLInstallDriver(LPCSTR lpszInfFile, LPCSTR lpszDriver, LPSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut)
int SQLInstallDriverExW(LPCWSTR lpszDriver, LPCWSTR lpszPathIn, LPWSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
int SQLGetConfigMode(UWORD *pwConfigMode)
int SQLGetTranslator(HWND hwnd, LPSTR lpszName, WORD cbNameMax, WORD *pcbNameOut, LPSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut, DWORD *pvOption)
int SQLGetTranslatorW(HWND hwnd, LPWSTR lpszName, WORD cbNameMax, WORD *pcbNameOut, LPWSTR lpszPath, WORD cbPathMax, WORD *pcbPathOut, DWORD *pvOption)
int SQLInstallTranslatorEx(LPCSTR lpszTranslator, LPCSTR lpszPathIn, LPSTR lpszPathOut, WORD cbPathOutMax, WORD *pcbPathOut, WORD fRequest, LPDWORD lpdwUsageCount)
Our generic window handle.