gdi32: GetCharABCWidthsA should work for DBCS.
[wine/multimedia.git] / include / sqltypes.h
blob5c8f3ca7b9a5906a29c081876f367249d996cb23
1 /*
2 * Copyright (C) 1999 Xiang Li
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __SQLTYPES_H
20 #define __SQLTYPES_H
22 #ifndef ODBCVER
23 #define ODBCVER 0x0351
24 #endif
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 typedef unsigned char SQLCHAR;
31 #ifdef WINE_UNICODE_NATIVE
32 typedef wchar_t SQLWCHAR;
33 #else
34 typedef unsigned short SQLWCHAR;
35 #endif
36 #ifndef UNICODE
37 typedef SQLCHAR SQLTCHAR;
38 #else
39 typedef SQLWCHAR SQLTCHAR;
40 #endif
42 #if (ODBCVER >= 0x0300)
43 typedef unsigned char SQLDATE;
44 typedef unsigned char SQLDECIMAL;
45 typedef double SQLDOUBLE;
46 typedef double SQLFLOAT;
47 #endif
49 typedef long SQLINTEGER;
51 #if (ODBCVER >= 0x0300)
52 typedef unsigned char SQLNUMERIC;
53 #endif
55 typedef void * SQLPOINTER;
57 #if (ODBCVER >= 0x0300)
58 typedef float SQLREAL;
59 #endif
61 typedef signed short int SQLSMALLINT;
62 typedef unsigned short SQLUSMALLINT;
64 #if (ODBCVER >= 0x0300)
65 typedef unsigned char SQLTIME;
66 typedef unsigned char SQLTIMESTAMP;
67 typedef unsigned char SQLVARCHAR;
68 #endif
70 typedef SQLSMALLINT SQLRETURN;
72 /* typedef void * SQLHANDLE; */
74 typedef SQLINTEGER SQLHANDLE;
75 #if (ODBCVER >= 0x0300)
77 typedef SQLHANDLE SQLHENV;
78 typedef SQLHANDLE SQLHDBC;
79 typedef SQLHANDLE SQLHSTMT;
80 typedef SQLHANDLE SQLHDESC;
82 #else
83 typedef SQLINTEGER SQLHENV;
84 typedef SQLINTEGER SQLHDBC;
85 typedef SQLINTEGER SQLHSTMT;
86 #endif
88 typedef signed char SCHAR;
89 typedef SCHAR SQLSCHAR;
90 typedef long int SDWORD;
91 typedef signed short int SWORD;
92 typedef unsigned long int UDWORD;
93 typedef unsigned short int UWORD;
94 typedef UDWORD SQLUINTEGER;
95 typedef signed long SLONG;
96 typedef signed short SSHORT;
97 typedef double SDOUBLE;
98 typedef double LDOUBLE;
99 typedef float SFLOAT;
100 typedef void* PTR;
101 typedef signed short RETCODE;
102 typedef void* SQLHWND;
104 #ifdef _WIN64
105 typedef INT64 SQLLEN;
106 typedef UINT64 SQLULEN;
107 typedef UINT64 SQLSETPOSIROW;
108 #else
109 #define SQLLEN SQLINTEGER
110 #define SQLULEN SQLUINTEGER
111 #define SQLSETPOSIROW SQLUSMALLINT
112 #endif
114 typedef SQLHANDLE HENV;
115 typedef SQLHANDLE HDBC;
116 typedef SQLHANDLE HSTMT;
118 #ifndef __SQLDATE
119 #define __SQLDATE
120 typedef struct tagDATE_STRUCT
122 SQLSMALLINT year;
123 SQLUSMALLINT month;
124 SQLUSMALLINT day;
125 } DATE_STRUCT;
127 #if (ODBCVER >= 0x0300)
128 typedef DATE_STRUCT SQL_DATE_STRUCT;
129 #endif
131 typedef struct tagTIME_STRUCT
133 SQLUSMALLINT hour;
134 SQLUSMALLINT minute;
135 SQLUSMALLINT second;
136 } TIME_STRUCT;
138 #if (ODBCVER >= 0x0300)
139 typedef TIME_STRUCT SQL_TIME_STRUCT;
140 #endif
142 typedef struct tagTIMESTAMP_STRUCT
144 SQLSMALLINT year;
145 SQLUSMALLINT month;
146 SQLUSMALLINT day;
147 SQLUSMALLINT hour;
148 SQLUSMALLINT minute;
149 SQLUSMALLINT second;
150 SQLUINTEGER fraction;
151 } TIMESTAMP_STRUCT;
153 #if (ODBCVER >= 0x0300)
154 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
155 #endif
158 #if (ODBCVER >= 0x0300)
159 typedef enum
161 SQL_IS_YEAR = 1,
162 SQL_IS_MONTH = 2,
163 SQL_IS_DAY = 3,
164 SQL_IS_HOUR = 4,
165 SQL_IS_MINUTE = 5,
166 SQL_IS_SECOND = 6,
167 SQL_IS_YEAR_TO_MONTH = 7,
168 SQL_IS_DAY_TO_HOUR = 8,
169 SQL_IS_DAY_TO_MINUTE = 9,
170 SQL_IS_DAY_TO_SECOND = 10,
171 SQL_IS_HOUR_TO_MINUTE = 11,
172 SQL_IS_HOUR_TO_SECOND = 12,
173 SQL_IS_MINUTE_TO_SECOND = 13
174 } SQLINTERVAL;
176 #endif
178 #if (ODBCVER >= 0x0300)
179 typedef struct tagSQL_YEAR_MONTH
181 SQLUINTEGER year;
182 SQLUINTEGER month;
183 } SQL_YEAR_MONTH_STRUCT;
185 typedef struct tagSQL_DAY_SECOND
187 SQLUINTEGER day;
188 SQLUINTEGER hour;
189 SQLUINTEGER minute;
190 SQLUINTEGER second;
191 SQLUINTEGER fraction;
192 } SQL_DAY_SECOND_STRUCT;
194 typedef struct tagSQL_INTERVAL_STRUCT
196 SQLINTERVAL interval_type;
197 SQLSMALLINT interval_sign;
198 union {
199 SQL_YEAR_MONTH_STRUCT year_month;
200 SQL_DAY_SECOND_STRUCT day_second;
201 } intval;
203 } SQL_INTERVAL_STRUCT;
205 #endif
207 #endif
209 #if (ODBCVER >= 0x0300)
210 #define ODBCINT64 long
211 #ifdef ODBCINT64
212 typedef ODBCINT64 SQLBIGINT;
213 typedef unsigned ODBCINT64 SQLUBIGINT;
214 #endif
215 #endif
217 #if (ODBCVER >= 0x0300)
218 #define SQL_MAX_NUMERIC_LEN 16
219 typedef struct tagSQL_NUMERIC_STRUCT
221 SQLCHAR precision;
222 SQLSCHAR scale;
223 SQLCHAR sign; /* 1=pos 0=neg */
224 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
225 } SQL_NUMERIC_STRUCT;
226 #endif
228 #if (ODBCVER >= 0x0350)
229 #ifdef GUID_DEFINED
230 typedef GUID SQLGUID;
231 #else
232 typedef struct tagSQLGUID
234 DWORD Data1;
235 WORD Data2;
236 WORD Data3;
237 BYTE Data4[ 8 ];
238 } SQLGUID;
239 #endif
240 #endif
243 typedef unsigned long int BOOKMARK;
245 #define SQL_WCHAR (-8)
246 #define SQL_C_WCHAR SQL_WCHAR
248 #ifdef __cplusplus
250 #endif
252 #endif