Built-in DLLs resources are now specified in spec file.
[wine/multimedia.git] / include / sqltypes.h
blob5a3761fa6c65a34cce3470c31bc4679717ce5636
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 #ifndef _WINDOWS
16 #define FAR
17 #define CALLBACK
18 #define SQL_API
19 #define BOOL int
20 typedef void* HWND;
21 typedef char* GUID;
22 #define GUID_DEFINED
23 typedef char CHAR;
24 typedef void VOID;
25 typedef unsigned short WORD;
26 typedef unsigned long DWORD;
27 typedef unsigned char BYTE;
28 typedef unsigned short WCHAR;
29 typedef WCHAR* LPWSTR;
30 typedef const char* LPCSTR;
31 typedef char* LPSTR;
32 typedef DWORD* LPDWORD;
33 #endif
35 typedef unsigned char SQLCHAR;
37 #if (ODBCVER >= 0x0300)
38 typedef unsigned char SQLDATE;
39 typedef unsigned char SQLDECIMAL;
40 typedef double SQLDOUBLE;
41 typedef double SQLFLOAT;
42 #endif
44 typedef long SQLINTEGER;
46 #if (ODBCVER >= 0x0300)
47 typedef unsigned char SQLNUMERIC;
48 #endif
50 typedef void * SQLPOINTER;
52 #if (ODBCVER >= 0x0300)
53 typedef float SQLREAL;
54 #endif
56 typedef signed short int SQLSMALLINT;
57 typedef unsigned short SQLUSMALLINT;
59 #if (ODBCVER >= 0x0300)
60 typedef unsigned char SQLTIME;
61 typedef unsigned char SQLTIMESTAMP;
62 typedef unsigned char SQLVARCHAR;
63 #endif
65 typedef SQLSMALLINT SQLRETURN;
67 /* typedef void * SQLHANDLE; */
69 typedef SQLINTEGER SQLHANDLE;
70 #if (ODBCVER >= 0x0300)
72 typedef SQLHANDLE SQLHENV;
73 typedef SQLHANDLE SQLHDBC;
74 typedef SQLHANDLE SQLHSTMT;
75 typedef SQLHANDLE SQLHDESC;
77 #else
78 typedef SQLINTEGER SQLHENV;
79 typedef SQLINTEGER SQLHDBC;
80 typedef SQLINTEGER SQLHSTMT;
81 #endif
83 typedef signed char SCHAR;
84 typedef SCHAR SQLSCHAR;
85 typedef long int SDWORD;
86 typedef signed short int SWORD;
87 typedef unsigned long int UDWORD;
88 typedef unsigned short int UWORD;
89 typedef UDWORD SQLUINTEGER;
90 typedef signed long SLONG;
91 typedef signed short SSHORT;
92 typedef double SDOUBLE;
93 typedef double LDOUBLE;
94 typedef float SFLOAT;
95 typedef void* PTR;
96 typedef signed short RETCODE;
97 typedef void* SQLHWND;
99 typedef SQLHANDLE HENV;
100 typedef SQLHANDLE HDBC;
101 typedef SQLHANDLE HSTMT;
103 #ifndef __SQLDATE
104 #define __SQLDATE
105 typedef struct tagDATE_STRUCT
107 SQLSMALLINT year;
108 SQLUSMALLINT month;
109 SQLUSMALLINT day;
110 } DATE_STRUCT;
112 #if (ODBCVER >= 0x0300)
113 typedef DATE_STRUCT SQL_DATE_STRUCT;
114 #endif
116 typedef struct tagTIME_STRUCT
118 SQLUSMALLINT hour;
119 SQLUSMALLINT minute;
120 SQLUSMALLINT second;
121 } TIME_STRUCT;
123 #if (ODBCVER >= 0x0300)
124 typedef TIME_STRUCT SQL_TIME_STRUCT;
125 #endif
127 typedef struct tagTIMESTAMP_STRUCT
129 SQLSMALLINT year;
130 SQLUSMALLINT month;
131 SQLUSMALLINT day;
132 SQLUSMALLINT hour;
133 SQLUSMALLINT minute;
134 SQLUSMALLINT second;
135 SQLUINTEGER fraction;
136 } TIMESTAMP_STRUCT;
138 #if (ODBCVER >= 0x0300)
139 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
140 #endif
143 #if (ODBCVER >= 0x0300)
144 typedef enum
146 SQL_IS_YEAR = 1,
147 SQL_IS_MONTH = 2,
148 SQL_IS_DAY = 3,
149 SQL_IS_HOUR = 4,
150 SQL_IS_MINUTE = 5,
151 SQL_IS_SECOND = 6,
152 SQL_IS_YEAR_TO_MONTH = 7,
153 SQL_IS_DAY_TO_HOUR = 8,
154 SQL_IS_DAY_TO_MINUTE = 9,
155 SQL_IS_DAY_TO_SECOND = 10,
156 SQL_IS_HOUR_TO_MINUTE = 11,
157 SQL_IS_HOUR_TO_SECOND = 12,
158 SQL_IS_MINUTE_TO_SECOND = 13
159 } SQLINTERVAL;
161 #endif
163 #if (ODBCVER >= 0x0300)
164 typedef struct tagSQL_YEAR_MONTH
166 SQLUINTEGER year;
167 SQLUINTEGER month;
168 } SQL_YEAR_MONTH_STRUCT;
170 typedef struct tagSQL_DAY_SECOND
172 SQLUINTEGER day;
173 SQLUINTEGER hour;
174 SQLUINTEGER minute;
175 SQLUINTEGER second;
176 SQLUINTEGER fraction;
177 } SQL_DAY_SECOND_STRUCT;
179 typedef struct tagSQL_INTERVAL_STRUCT
181 SQLINTERVAL interval_type;
182 SQLSMALLINT interval_sign;
183 union {
184 SQL_YEAR_MONTH_STRUCT year_month;
185 SQL_DAY_SECOND_STRUCT day_second;
186 } intval;
188 } SQL_INTERVAL_STRUCT;
190 #endif
192 #endif
194 #if (ODBCVER >= 0x0300)
195 #define ODBCINT64 long
196 #ifdef ODBCINT64
197 typedef ODBCINT64 SQLBIGINT;
198 typedef unsigned ODBCINT64 SQLUBIGINT;
199 #endif
200 #endif
202 #if (ODBCVER >= 0x0300)
203 #define SQL_MAX_NUMERIC_LEN 16
204 typedef struct tagSQL_NUMERIC_STRUCT
206 SQLCHAR precision;
207 SQLSCHAR scale;
208 SQLCHAR sign; /* 1=pos 0=neg */
209 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
210 } SQL_NUMERIC_STRUCT;
211 #endif
213 #if (ODBCVER >= 0x0350)
214 #ifdef GUID_DEFINED
215 typedef GUID SQLGUID;
216 #else
217 typedef struct tagSQLGUID
219 DWORD Data1;
220 WORD Data2;
221 WORD Data3;
222 BYTE Data4[ 8 ];
223 } SQLGUID;
224 #endif
225 #endif
228 typedef unsigned long int BOOKMARK;
230 #define SQL_WCHAR (-8)
231 #define SQL_C_WCHAR SQL_WCHAR
233 #ifdef __cplusplus
235 #endif
237 #endif