Avoid buffer overflows in builtin dll loading (with the help of Dmitry
[wine/multimedia.git] / include / sqltypes.h
blob2d62f5bd222393af411dcb0eac80130c4e89f304
1 /*
2 * sqltypes.h
3 */
4 #ifndef __SQLTYPES_H
5 #define __SQLTYPES_H
7 #ifndef ODBCVER
8 #define ODBCVER 0x0351
9 #endif
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
15 typedef unsigned char SQLCHAR;
17 #if (ODBCVER >= 0x0300)
18 typedef unsigned char SQLDATE;
19 typedef unsigned char SQLDECIMAL;
20 typedef double SQLDOUBLE;
21 typedef double SQLFLOAT;
22 #endif
24 typedef long SQLINTEGER;
26 #if (ODBCVER >= 0x0300)
27 typedef unsigned char SQLNUMERIC;
28 #endif
30 typedef void * SQLPOINTER;
32 #if (ODBCVER >= 0x0300)
33 typedef float SQLREAL;
34 #endif
36 typedef signed short int SQLSMALLINT;
37 typedef unsigned short SQLUSMALLINT;
39 #if (ODBCVER >= 0x0300)
40 typedef unsigned char SQLTIME;
41 typedef unsigned char SQLTIMESTAMP;
42 typedef unsigned char SQLVARCHAR;
43 #endif
45 typedef SQLSMALLINT SQLRETURN;
47 /* typedef void * SQLHANDLE; */
49 typedef SQLINTEGER SQLHANDLE;
50 #if (ODBCVER >= 0x0300)
52 typedef SQLHANDLE SQLHENV;
53 typedef SQLHANDLE SQLHDBC;
54 typedef SQLHANDLE SQLHSTMT;
55 typedef SQLHANDLE SQLHDESC;
57 #else
58 typedef SQLINTEGER SQLHENV;
59 typedef SQLINTEGER SQLHDBC;
60 typedef SQLINTEGER SQLHSTMT;
61 #endif
63 typedef signed char SCHAR;
64 typedef SCHAR SQLSCHAR;
65 typedef long int SDWORD;
66 typedef signed short int SWORD;
67 typedef unsigned long int UDWORD;
68 typedef unsigned short int UWORD;
69 typedef UDWORD SQLUINTEGER;
70 typedef signed long SLONG;
71 typedef signed short SSHORT;
72 typedef double SDOUBLE;
73 typedef double LDOUBLE;
74 typedef float SFLOAT;
75 typedef void* PTR;
76 typedef signed short RETCODE;
77 typedef void* SQLHWND;
79 typedef SQLHANDLE HENV;
80 typedef SQLHANDLE HDBC;
81 typedef SQLHANDLE HSTMT;
83 #ifndef __SQLDATE
84 #define __SQLDATE
85 typedef struct tagDATE_STRUCT
87 SQLSMALLINT year;
88 SQLUSMALLINT month;
89 SQLUSMALLINT day;
90 } DATE_STRUCT;
92 #if (ODBCVER >= 0x0300)
93 typedef DATE_STRUCT SQL_DATE_STRUCT;
94 #endif
96 typedef struct tagTIME_STRUCT
98 SQLUSMALLINT hour;
99 SQLUSMALLINT minute;
100 SQLUSMALLINT second;
101 } TIME_STRUCT;
103 #if (ODBCVER >= 0x0300)
104 typedef TIME_STRUCT SQL_TIME_STRUCT;
105 #endif
107 typedef struct tagTIMESTAMP_STRUCT
109 SQLSMALLINT year;
110 SQLUSMALLINT month;
111 SQLUSMALLINT day;
112 SQLUSMALLINT hour;
113 SQLUSMALLINT minute;
114 SQLUSMALLINT second;
115 SQLUINTEGER fraction;
116 } TIMESTAMP_STRUCT;
118 #if (ODBCVER >= 0x0300)
119 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
120 #endif
123 #if (ODBCVER >= 0x0300)
124 typedef enum
126 SQL_IS_YEAR = 1,
127 SQL_IS_MONTH = 2,
128 SQL_IS_DAY = 3,
129 SQL_IS_HOUR = 4,
130 SQL_IS_MINUTE = 5,
131 SQL_IS_SECOND = 6,
132 SQL_IS_YEAR_TO_MONTH = 7,
133 SQL_IS_DAY_TO_HOUR = 8,
134 SQL_IS_DAY_TO_MINUTE = 9,
135 SQL_IS_DAY_TO_SECOND = 10,
136 SQL_IS_HOUR_TO_MINUTE = 11,
137 SQL_IS_HOUR_TO_SECOND = 12,
138 SQL_IS_MINUTE_TO_SECOND = 13
139 } SQLINTERVAL;
141 #endif
143 #if (ODBCVER >= 0x0300)
144 typedef struct tagSQL_YEAR_MONTH
146 SQLUINTEGER year;
147 SQLUINTEGER month;
148 } SQL_YEAR_MONTH_STRUCT;
150 typedef struct tagSQL_DAY_SECOND
152 SQLUINTEGER day;
153 SQLUINTEGER hour;
154 SQLUINTEGER minute;
155 SQLUINTEGER second;
156 SQLUINTEGER fraction;
157 } SQL_DAY_SECOND_STRUCT;
159 typedef struct tagSQL_INTERVAL_STRUCT
161 SQLINTERVAL interval_type;
162 SQLSMALLINT interval_sign;
163 union {
164 SQL_YEAR_MONTH_STRUCT year_month;
165 SQL_DAY_SECOND_STRUCT day_second;
166 } intval;
168 } SQL_INTERVAL_STRUCT;
170 #endif
172 #endif
174 #if (ODBCVER >= 0x0300)
175 #define ODBCINT64 long
176 #ifdef ODBCINT64
177 typedef ODBCINT64 SQLBIGINT;
178 typedef unsigned ODBCINT64 SQLUBIGINT;
179 #endif
180 #endif
182 #if (ODBCVER >= 0x0300)
183 #define SQL_MAX_NUMERIC_LEN 16
184 typedef struct tagSQL_NUMERIC_STRUCT
186 SQLCHAR precision;
187 SQLSCHAR scale;
188 SQLCHAR sign; /* 1=pos 0=neg */
189 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
190 } SQL_NUMERIC_STRUCT;
191 #endif
193 #if (ODBCVER >= 0x0350)
194 #ifdef GUID_DEFINED
195 typedef GUID SQLGUID;
196 #else
197 typedef struct tagSQLGUID
199 DWORD Data1;
200 WORD Data2;
201 WORD Data3;
202 BYTE Data4[ 8 ];
203 } SQLGUID;
204 #endif
205 #endif
208 typedef unsigned long int BOOKMARK;
210 #define SQL_WCHAR (-8)
211 #define SQL_C_WCHAR SQL_WCHAR
213 #ifdef __cplusplus
215 #endif
217 #endif