Rework RegisterFonts to use MSI_IterateRecords.
[wine.git] / include / sqltypes.h
blobbb2dd4a65d4f8040ae24b4cf48f5b64d4556b070
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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;
32 #if (ODBCVER >= 0x0300)
33 typedef unsigned char SQLDATE;
34 typedef unsigned char SQLDECIMAL;
35 typedef double SQLDOUBLE;
36 typedef double SQLFLOAT;
37 #endif
39 typedef long SQLINTEGER;
41 #if (ODBCVER >= 0x0300)
42 typedef unsigned char SQLNUMERIC;
43 #endif
45 typedef void * SQLPOINTER;
47 #if (ODBCVER >= 0x0300)
48 typedef float SQLREAL;
49 #endif
51 typedef signed short int SQLSMALLINT;
52 typedef unsigned short SQLUSMALLINT;
54 #if (ODBCVER >= 0x0300)
55 typedef unsigned char SQLTIME;
56 typedef unsigned char SQLTIMESTAMP;
57 typedef unsigned char SQLVARCHAR;
58 #endif
60 typedef SQLSMALLINT SQLRETURN;
62 /* typedef void * SQLHANDLE; */
64 typedef SQLINTEGER SQLHANDLE;
65 #if (ODBCVER >= 0x0300)
67 typedef SQLHANDLE SQLHENV;
68 typedef SQLHANDLE SQLHDBC;
69 typedef SQLHANDLE SQLHSTMT;
70 typedef SQLHANDLE SQLHDESC;
72 #else
73 typedef SQLINTEGER SQLHENV;
74 typedef SQLINTEGER SQLHDBC;
75 typedef SQLINTEGER SQLHSTMT;
76 #endif
78 typedef signed char SCHAR;
79 typedef SCHAR SQLSCHAR;
80 typedef long int SDWORD;
81 typedef signed short int SWORD;
82 typedef unsigned long int UDWORD;
83 typedef unsigned short int UWORD;
84 typedef UDWORD SQLUINTEGER;
85 typedef signed long SLONG;
86 typedef signed short SSHORT;
87 typedef double SDOUBLE;
88 typedef double LDOUBLE;
89 typedef float SFLOAT;
90 typedef void* PTR;
91 typedef signed short RETCODE;
92 typedef void* SQLHWND;
94 typedef SQLHANDLE HENV;
95 typedef SQLHANDLE HDBC;
96 typedef SQLHANDLE HSTMT;
98 #ifndef __SQLDATE
99 #define __SQLDATE
100 typedef struct tagDATE_STRUCT
102 SQLSMALLINT year;
103 SQLUSMALLINT month;
104 SQLUSMALLINT day;
105 } DATE_STRUCT;
107 #if (ODBCVER >= 0x0300)
108 typedef DATE_STRUCT SQL_DATE_STRUCT;
109 #endif
111 typedef struct tagTIME_STRUCT
113 SQLUSMALLINT hour;
114 SQLUSMALLINT minute;
115 SQLUSMALLINT second;
116 } TIME_STRUCT;
118 #if (ODBCVER >= 0x0300)
119 typedef TIME_STRUCT SQL_TIME_STRUCT;
120 #endif
122 typedef struct tagTIMESTAMP_STRUCT
124 SQLSMALLINT year;
125 SQLUSMALLINT month;
126 SQLUSMALLINT day;
127 SQLUSMALLINT hour;
128 SQLUSMALLINT minute;
129 SQLUSMALLINT second;
130 SQLUINTEGER fraction;
131 } TIMESTAMP_STRUCT;
133 #if (ODBCVER >= 0x0300)
134 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
135 #endif
138 #if (ODBCVER >= 0x0300)
139 typedef enum
141 SQL_IS_YEAR = 1,
142 SQL_IS_MONTH = 2,
143 SQL_IS_DAY = 3,
144 SQL_IS_HOUR = 4,
145 SQL_IS_MINUTE = 5,
146 SQL_IS_SECOND = 6,
147 SQL_IS_YEAR_TO_MONTH = 7,
148 SQL_IS_DAY_TO_HOUR = 8,
149 SQL_IS_DAY_TO_MINUTE = 9,
150 SQL_IS_DAY_TO_SECOND = 10,
151 SQL_IS_HOUR_TO_MINUTE = 11,
152 SQL_IS_HOUR_TO_SECOND = 12,
153 SQL_IS_MINUTE_TO_SECOND = 13
154 } SQLINTERVAL;
156 #endif
158 #if (ODBCVER >= 0x0300)
159 typedef struct tagSQL_YEAR_MONTH
161 SQLUINTEGER year;
162 SQLUINTEGER month;
163 } SQL_YEAR_MONTH_STRUCT;
165 typedef struct tagSQL_DAY_SECOND
167 SQLUINTEGER day;
168 SQLUINTEGER hour;
169 SQLUINTEGER minute;
170 SQLUINTEGER second;
171 SQLUINTEGER fraction;
172 } SQL_DAY_SECOND_STRUCT;
174 typedef struct tagSQL_INTERVAL_STRUCT
176 SQLINTERVAL interval_type;
177 SQLSMALLINT interval_sign;
178 union {
179 SQL_YEAR_MONTH_STRUCT year_month;
180 SQL_DAY_SECOND_STRUCT day_second;
181 } intval;
183 } SQL_INTERVAL_STRUCT;
185 #endif
187 #endif
189 #if (ODBCVER >= 0x0300)
190 #define ODBCINT64 long
191 #ifdef ODBCINT64
192 typedef ODBCINT64 SQLBIGINT;
193 typedef unsigned ODBCINT64 SQLUBIGINT;
194 #endif
195 #endif
197 #if (ODBCVER >= 0x0300)
198 #define SQL_MAX_NUMERIC_LEN 16
199 typedef struct tagSQL_NUMERIC_STRUCT
201 SQLCHAR precision;
202 SQLSCHAR scale;
203 SQLCHAR sign; /* 1=pos 0=neg */
204 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
205 } SQL_NUMERIC_STRUCT;
206 #endif
208 #if (ODBCVER >= 0x0350)
209 #ifdef GUID_DEFINED
210 typedef GUID SQLGUID;
211 #else
212 typedef struct tagSQLGUID
214 DWORD Data1;
215 WORD Data2;
216 WORD Data3;
217 BYTE Data4[ 8 ];
218 } SQLGUID;
219 #endif
220 #endif
223 typedef unsigned long int BOOKMARK;
225 #define SQL_WCHAR (-8)
226 #define SQL_C_WCHAR SQL_WCHAR
228 #ifdef __cplusplus
230 #endif
232 #endif