File: odbcinst.d

package info (click to toggle)
gcc-arm-none-eabi 15%3A12.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 959,712 kB
  • sloc: cpp: 3,275,382; ansic: 2,061,766; ada: 840,956; f90: 208,513; makefile: 76,132; asm: 73,433; xml: 50,448; exp: 34,146; sh: 32,436; objc: 15,637; fortran: 14,012; python: 11,991; pascal: 6,787; awk: 4,779; perl: 3,054; yacc: 338; ml: 285; lex: 201; haskell: 122
file content (169 lines) | stat: -rw-r--r-- 6,646 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/**
 * Windows API header module
 *
 * Translated from MinGW Windows headers
 *
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
 * Source: $(DRUNTIMESRC core/sys/windows/_odbcinst.d)
 */
module core.sys.windows.odbcinst;
version (Windows):
@system:

version (ANSI) {} else version = Unicode;

import core.sys.windows.sql;
import core.sys.windows.windef;

/*  FIXME: The Unicode/Ansi functions situation is a mess. How do the xxxA
 *  versions of these functions fit into the scheme?
 */

// SQLConfigDataSource()
enum : WORD {
    ODBC_ADD_DSN            = 1,
    ODBC_CONFIG_DSN         = 2,
    ODBC_REMOVE_DSN         = 3,
    ODBC_ADD_SYS_DSN        = 4,
    ODBC_CONFIG_SYS_DSN     = 5,
    ODBC_REMOVE_SYS_DSN     = 6,
    ODBC_REMOVE_DEFAULT_DSN = 7
}

// ODBC 3.0+
enum : WORD {
    ODBC_INSTALL_INQUIRY  = 1,
    ODBC_INSTALL_COMPLETE = 2
}

// ODBC 2.5+
enum : WORD {
    ODBC_INSTALL_DRIVER    = 1,
    ODBC_REMOVE_DRIVER     = 2,
    ODBC_CONFIG_DRIVER     = 3,
    ODBC_CONFIG_DRIVER_MAX = 100
}

// ODBC 3.0+
// SQLSetConfigMode()
enum : UWORD {
    ODBC_BOTH_DSN   = 0,
    ODBC_USER_DSN   = 1,
    ODBC_SYSTEM_DSN = 2
}

enum : DWORD {
    ODBC_ERROR_GENERAL_ERR             = 1,
    ODBC_ERROR_INVALID_BUFF_LEN        = 2,
    ODBC_ERROR_INVALID_HWND            = 3,
    ODBC_ERROR_INVALID_STR             = 4,
    ODBC_ERROR_INVALID_REQUEST_TYPE    = 5,
    ODBC_ERROR_COMPONENT_NOT_FOUND     = 6,
    ODBC_ERROR_INVALID_NAME            = 7,
    ODBC_ERROR_INVALID_KEYWORD_VALUE   = 8,
    ODBC_ERROR_INVALID_DSN             = 9,
    ODBC_ERROR_INVALID_INF             = 10,
    ODBC_ERROR_REQUEST_FAILED          = 11,
    ODBC_ERROR_INVALID_PATH            = 12,
    ODBC_ERROR_LOAD_LIB_FAILED         = 13,
    ODBC_ERROR_INVALID_PARAM_SEQUENCE  = 14,
    ODBC_ERROR_INVALID_LOG_FILE        = 15,
    ODBC_ERROR_USER_CANCELED           = 16,
    ODBC_ERROR_USAGE_UPDATE_FAILED     = 17,
    ODBC_ERROR_CREATE_DSN_FAILED       = 18,
    ODBC_ERROR_WRITING_SYSINFO_FAILED  = 19,
    ODBC_ERROR_REMOVE_DSN_FAILED       = 20,
    ODBC_ERROR_OUT_OF_MEM              = 21,
    ODBC_ERROR_OUTPUT_STRING_TRUNCATED = 22
}

extern (Windows):
BOOL  ConfigDSN(HWND,WORD,LPCSTR,LPCSTR);
BOOL  ConfigDSNW(HWND,WORD,LPCWSTR,LPCWSTR);
BOOL  ConfigTranslator(HWND,DWORD*);
BOOL  SQLConfigDataSource(HWND,WORD,LPCSTR,LPCSTR);
BOOL  SQLConfigDataSourceW(HWND,WORD,LPCWSTR,LPCWSTR);
BOOL  SQLCreateDataSource(HWND,LPCSTR);
BOOL  SQLCreateDataSourceW(HWND,LPCWSTR);
BOOL  SQLGetAvailableDrivers(LPCSTR,LPSTR,WORD,WORD*);
BOOL  SQLGetAvailableDriversW(LPCWSTR,LPWSTR,WORD,WORD*);
BOOL  SQLGetInstalledDrivers(LPSTR,WORD,WORD*);
BOOL  SQLGetInstalledDriversW(LPWSTR,WORD,WORD*);
int  SQLGetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,int,LPCSTR);
int  SQLGetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,int,LPCWSTR);
BOOL  SQLGetTranslator(HWND,LPSTR,WORD,WORD*,LPSTR,WORD,WORD*,DWORD*);
BOOL  SQLGetTranslatorW(HWND,LPWSTR,WORD,WORD*,LPWSTR,WORD,WORD*,DWORD*);
BOOL  SQLInstallDriver(LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
BOOL  SQLInstallDriverManager(LPSTR,WORD,WORD*);
BOOL  SQLInstallDriverManagerW(LPWSTR,WORD,WORD*);
BOOL  SQLInstallDriverW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
BOOL  SQLInstallODBC(HWND,LPCSTR,LPCSTR,LPCSTR);
BOOL  SQLInstallODBCW(HWND,LPCWSTR,LPCWSTR,LPCWSTR);
BOOL  SQLManageDataSources(HWND);
BOOL  SQLRemoveDefaultDataSource();
BOOL  SQLRemoveDSNFromIni(LPCSTR);
BOOL  SQLRemoveDSNFromIniW(LPCWSTR);
BOOL  SQLValidDSN(LPCSTR);
BOOL  SQLValidDSNW(LPCWSTR);
BOOL  SQLWriteDSNToIni(LPCSTR,LPCSTR);
BOOL  SQLWriteDSNToIniW(LPCWSTR,LPCWSTR);
BOOL  SQLWritePrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
BOOL  SQLWritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);

static if (ODBCVER >= 0x0250) {
    BOOL  ConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
    BOOL  ConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
    BOOL  SQLConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
    BOOL  SQLConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
    deprecated ("Use SQLInstallTranslatorExW instead") {
        BOOL  SQLInstallTranslator(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
        BOOL  SQLInstallTranslatorW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
    }
    BOOL  SQLRemoveDriver(LPCSTR,BOOL,LPDWORD);
    BOOL  SQLRemoveDriverManager(LPDWORD);
    BOOL  SQLRemoveDriverW(LPCWSTR,BOOL,LPDWORD);
    BOOL  SQLRemoveTranslator(LPCSTR,LPDWORD);
    BOOL  SQLRemoveTranslatorW(LPCWSTR,LPDWORD);
}
static if (ODBCVER >= 0x0300) {
    BOOL  SQLGetConfigMode(UWORD*);
    BOOL  SQLInstallDriverEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
    BOOL  SQLInstallDriverExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
    SQLRETURN  SQLInstallerError(WORD,DWORD*,LPSTR,WORD,WORD*);
    SQLRETURN  SQLInstallerErrorW(WORD,DWORD*,LPWSTR,WORD,WORD*);
    BOOL  SQLInstallTranslatorEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
    BOOL  SQLInstallTranslatorExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
    SQLRETURN  SQLPostInstallerError(DWORD,LPCSTR);
    SQLRETURN  SQLPostInstallerErrorW(DWORD,LPCWSTR);
    BOOL  SQLReadFileDSN(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
    BOOL  SQLReadFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
    BOOL  SQLSetConfigMode(UWORD);
    BOOL  SQLWriteFileDSN(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
    BOOL  SQLWriteFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
}

version (Unicode) {
    alias SQLConfigDataSourceW SQLConfigDataSource;
    alias SQLConfigDriverW SQLConfigDriver;
    alias SQLCreateDataSourceW SQLCreateDataSource;
    alias SQLGetAvailableDriversW SQLGetAvailableDrivers;
    alias SQLGetInstalledDriversW SQLGetInstalledDrivers;
    alias SQLGetPrivateProfileStringW SQLGetPrivateProfileString;
    alias SQLGetTranslatorW SQLGetTranslator;
    alias SQLInstallDriverW SQLInstallDriver;
    alias SQLInstallDriverExW SQLInstallDriverEx;
    alias SQLInstallDriverManagerW SQLInstallDriverManager;
    alias SQLInstallerErrorW SQLInstallerError;
    alias SQLInstallODBCW SQLInstallODBC;
    deprecated alias SQLInstallTranslatorW SQLInstallTranslator;
    alias SQLInstallTranslatorExW SQLInstallTranslatorEx;
    alias SQLPostInstallerErrorW SQLPostInstallerError;
    alias SQLReadFileDSNW SQLReadFileDSN;
    alias SQLRemoveDriverW SQLRemoveDriver;
    alias SQLRemoveDSNFromIniW SQLRemoveDSNFromIni;
    alias SQLRemoveTranslatorW SQLRemoveTranslator;
    alias SQLValidDSNW SQLValidDSN;
    alias SQLWriteDSNToIniW SQLWriteDSNToIni;
    alias SQLWriteFileDSNW SQLWriteFileDSN;
    alias SQLWritePrivateProfileStringW SQLWritePrivateProfileString;
}