ReactOS  r75907
sqltypes.h
Go to the documentation of this file.
1 #ifndef __SQLTYPES
2 #define __SQLTYPES
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #define SQL_API __stdcall
9 
10 #ifndef RC_INVOKED
11 #define __need_wchar_t
12 #include <stddef.h>
13 
14 typedef signed char SCHAR;
15 typedef long SDWORD;
16 typedef short SWORD;
17 typedef ULONG UDWORD;
18 typedef USHORT UWORD;
19 typedef signed long SLONG;
20 typedef signed short SSHORT;
21 typedef double SDOUBLE;
22 typedef double LDOUBLE;
23 typedef float SFLOAT;
24 typedef PVOID PTR;
25 typedef PVOID HENV;
26 typedef PVOID HDBC;
27 typedef PVOID HSTMT;
28 typedef short RETCODE;
29 typedef UCHAR SQLCHAR;
30 typedef SDWORD SQLINTEGER;
31 typedef SWORD SQLSMALLINT;
32 typedef UDWORD SQLUINTEGER;
33 typedef UWORD SQLUSMALLINT;
34 typedef PVOID SQLPOINTER;
35 typedef void* SQLHENV;
36 typedef void* SQLHDBC;
37 typedef void* SQLHSTMT;
38 typedef SQLSMALLINT SQLRETURN;
39 typedef HWND SQLHWND;
40 
41 #ifdef _WIN64
42 typedef INT64 SQLLEN;
43 typedef UINT64 SQLULEN;
44 typedef UINT64 SQLSETPOSIROW;
45 #else
46 #define SQLLEN SQLINTEGER
47 #define SQLULEN SQLUINTEGER
48 #define SQLSETPOSIROW SQLUSMALLINT
49 #endif /* _WIN64 */
50 
51 typedef SQLULEN BOOKMARK;
52 typedef SQLLEN SQLROWOFFSET;
53 typedef SQLULEN SQLROWCOUNT;
54 typedef SQLULEN SQLTRANSID;
55 
56 typedef wchar_t SQLWCHAR;
57 #ifdef UNICODE
58 typedef SQLWCHAR SQLTCHAR;
59 #else
60 typedef SQLCHAR SQLTCHAR;
61 #endif /* UNICODE */
62 
63 typedef struct tagDATE_STRUCT {
64  SQLSMALLINT year;
65  SQLUSMALLINT month;
66  SQLUSMALLINT day;
67 } DATE_STRUCT;
68 typedef struct tagTIME_STRUCT {
69  SQLUSMALLINT hour;
70  SQLUSMALLINT minute;
71  SQLUSMALLINT second;
72 } TIME_STRUCT;
73 typedef struct tagTIMESTAMP_STRUCT {
74  SQLSMALLINT year;
75  SQLUSMALLINT month;
76  SQLUSMALLINT day;
77  SQLUSMALLINT hour;
78  SQLUSMALLINT minute;
79  SQLUSMALLINT second;
80  SQLUINTEGER fraction;
82 
83 #if (ODBCVER >= 0x0300)
84 typedef SCHAR SQLSCHAR;
85 typedef void* SQLHANDLE;
86 typedef void* SQLHDESC;
87 typedef unsigned char SQLDATE;
88 typedef unsigned char SQLDECIMAL;
89 typedef double SQLDOUBLE;
90 typedef double SQLFLOAT;
91 typedef unsigned char SQLNUMERIC;
92 typedef float SQLREAL;
93 typedef unsigned char SQLTIME;
94 typedef unsigned char SQLTIMESTAMP;
95 typedef unsigned char SQLVARCHAR;
96 #define ODBCINT64 __int64
97 typedef __int64 SQLBIGINT;
98 typedef unsigned __int64 SQLUBIGINT;
99 typedef DATE_STRUCT SQL_DATE_STRUCT;
100 typedef TIME_STRUCT SQL_TIME_STRUCT;
101 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
102 typedef enum {
103  SQL_IS_YEAR = 1,SQL_IS_MONTH,SQL_IS_DAY,SQL_IS_HOUR,
104  SQL_IS_MINUTE,SQL_IS_SECOND,SQL_IS_YEAR_TO_MONTH,SQL_IS_DAY_TO_HOUR,
105  SQL_IS_DAY_TO_MINUTE,SQL_IS_DAY_TO_SECOND,SQL_IS_HOUR_TO_MINUTE,
106  SQL_IS_HOUR_TO_SECOND,SQL_IS_MINUTE_TO_SECOND
107 } SQLINTERVAL;
108 typedef struct tagSQL_YEAR_MONTH {
109  SQLUINTEGER year;
110  SQLUINTEGER month;
111 } SQL_YEAR_MONTH_STRUCT;
112 typedef struct tagSQL_DAY_SECOND {
113  SQLUINTEGER day;
114  SQLUINTEGER hour;
115  SQLUINTEGER minute;
116  SQLUINTEGER second;
117  SQLUINTEGER fraction;
118 } SQL_DAY_SECOND_STRUCT;
119 typedef struct tagSQL_INTERVAL_STRUCT {
120  SQLINTERVAL interval_type;
121  SQLSMALLINT interval_sign;
122  union {
123  SQL_YEAR_MONTH_STRUCT year_month;
124  SQL_DAY_SECOND_STRUCT day_second;
125  } intval;
126 } SQL_INTERVAL_STRUCT;
127 #define SQL_MAX_NUMERIC_LEN 16
128 typedef struct tagSQL_NUMERIC_STRUCT {
129  SQLCHAR precision;
130  SQLSCHAR scale;
131  SQLCHAR sign;
132  SQLCHAR val[SQL_MAX_NUMERIC_LEN];
133 } SQL_NUMERIC_STRUCT;
134 #endif /* ODBCVER >= 0x0300 */
135 
136 #if (ODBCVER >= 0x0350)
137 
138 #ifdef _GUID_DEFINED
139 # warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
140 #endif
141 
142 #if defined _GUID_DEFINED || defined GUID_DEFINED
143 typedef GUID SQLGUID;
144 #else
145 typedef struct tagSQLGUID{
146  DWORD Data1;
147  WORD Data2;
148  WORD Data3;
149  BYTE Data4[ 8 ];
150 } SQLGUID;
151 #endif /* GUID_DEFINED */
152 #endif /* ODBCVER >= 0x0350 */
153 #endif /* RC_INVOKED */
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif /* __SQLTYPES */
DWORD *typedef PVOID
Definition: winlogon.h:52
double SDOUBLE
Definition: sqltypes.h:21
static size_t double int int int * sign
Definition: printf.c:64
HWND SQLHWND
Definition: sqltypes.h:39
SDWORD SQLINTEGER
Definition: sqltypes.h:30
long SDWORD
Definition: sqltypes.h:15
SQLUINTEGER fraction
Definition: sqltypes.h:80
SQLSMALLINT SQLRETURN
Definition: sqltypes.h:38
unsigned short WORD
Definition: ntddk_ex.h:93
SQLUSMALLINT hour
Definition: sqltypes.h:77
UDWORD SQLUINTEGER
Definition: sqltypes.h:32
SQLUSMALLINT month
Definition: sqltypes.h:75
SQLUSMALLINT hour
Definition: sqltypes.h:69
SQLCHAR SQLTCHAR
Definition: sqltypes.h:60
SQLULEN BOOKMARK
Definition: sqltypes.h:51
PVOID HSTMT
Definition: sqltypes.h:27
SQLSMALLINT year
Definition: sqltypes.h:64
static DOUBLE day(DOUBLE time)
Definition: date.c:102
HANDLE HWND
Definition: compat.h:13
SQLULEN SQLTRANSID
Definition: sqltypes.h:54
SQLUSMALLINT month
Definition: sqltypes.h:65
SQLUSMALLINT second
Definition: sqltypes.h:71
SWORD SQLSMALLINT
Definition: sqltypes.h:31
struct tagTIMESTAMP_STRUCT TIMESTAMP_STRUCT
DWORD DWORD
Definition: winlogon.h:75
ULONG UDWORD
Definition: sqltypes.h:17
GLfloat scale
Definition: m_xform.h:122
signed long SLONG
Definition: sqltypes.h:19
signed long long INT64
void * SQLHSTMT
Definition: sqltypes.h:37
short RETCODE
Definition: sqltypes.h:28
double LDOUBLE
Definition: sqltypes.h:22
GLenum GLint GLint * precision
Definition: glext.h:7539
void * SQLHENV
Definition: sqltypes.h:35
GLuint GLfloat * val
Definition: glext.h:7180
wchar_t SQLWCHAR
Definition: sqltypes.h:56
SQLULEN SQLROWCOUNT
Definition: sqltypes.h:53
struct tagTIME_STRUCT TIME_STRUCT
UCHAR SQLCHAR
Definition: sqltypes.h:29
SQLLEN SQLROWOFFSET
Definition: sqltypes.h:52
signed char SCHAR
Definition: sqltypes.h:14
PVOID HDBC
Definition: sqltypes.h:26
void * SQLHDBC
Definition: sqltypes.h:36
short SWORD
Definition: sqltypes.h:16
unsigned char UCHAR
Definition: xmlstorage.h:181
UWORD SQLUSMALLINT
Definition: sqltypes.h:33
float SFLOAT
Definition: sqltypes.h:23
SQLUSMALLINT day
Definition: sqltypes.h:66
SQLUSMALLINT second
Definition: sqltypes.h:79
SQLUSMALLINT minute
Definition: sqltypes.h:78
unsigned char BYTE
Definition: ntddk_ex.h:96
PVOID HENV
Definition: sqltypes.h:25
#define SQLULEN
Definition: sqltypes.h:47
unsigned short USHORT
Definition: pedump.c:61
PVOID SQLPOINTER
Definition: sqltypes.h:34
USHORT UWORD
Definition: sqltypes.h:18
SQLSMALLINT year
Definition: sqltypes.h:74
PVOID PTR
Definition: sqltypes.h:24
struct tagDATE_STRUCT DATE_STRUCT
signed short SSHORT
Definition: sqltypes.h:20
unsigned int ULONG
Definition: retypes.h:1
#define SQLSETPOSIROW
Definition: sqltypes.h:48
int month[12]
Definition: systime.c:13
unsigned long long UINT64
#define SQLLEN
Definition: sqltypes.h:46
SQLUSMALLINT minute
Definition: sqltypes.h:70
SQLUSMALLINT day
Definition: sqltypes.h:76
#define __int64
Definition: basetyps.h:16