source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/srv.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 10.2 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _ODS_SRV_H_
7#define _ODS_SRV_H_
8
9#ifndef COMPILE_FOR_CLR
10#include "windows.h"
11#endif
12
13#pragma pack(4)
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#ifndef FAR
20#define FAR
21#endif
22
23#ifndef DBTYPEDEFS
24#ifndef MAXNUMERICLEN
25#define DBTYPEDEFS
26
27 typedef unsigned char DBBOOL;
28 typedef unsigned char DBBYTE;
29 typedef unsigned char DBTINYINT;
30 typedef short DBSMALLINT;
31 typedef unsigned short DBUSMALLINT;
32 typedef __LONG32 DBINT;
33 typedef char DBCHAR;
34 typedef unsigned char DBBINARY;
35 typedef unsigned char DBBIT;
36 typedef double DBFLT8;
37
38 typedef struct srv_datetime {
39 __LONG32 dtdays;
40 unsigned __LONG32 dttime;
41 } DBDATETIME;
42
43 typedef struct srv_money {
44 __LONG32 mnyhigh;
45 unsigned __LONG32 mnylow;
46 } DBMONEY;
47
48 typedef float DBFLT4;
49 typedef __LONG32 DBMONEY4;
50
51 typedef struct dbdatetime4 {
52 unsigned short numdays;
53 unsigned short nummins;
54 } DBDATETIM4;
55
56#define MAXNUMERICLEN 16
57 typedef struct dbnumeric {
58 BYTE precision;
59 BYTE scale;
60 BYTE sign;
61 BYTE val[MAXNUMERICLEN];
62 } DBNUMERIC;
63 typedef DBNUMERIC DBDECIMAL;
64#endif
65#endif
66
67#define SRV_TDS_NULL (BYTE) 0x1f
68#define SRV_TDS_TEXT (BYTE) 0x23
69#define SRV_TDS_GUID (BYTE) 0x24
70#define SRV_TDS_VARBINARY (BYTE) 0x25
71#define SRV_TDS_INTN (BYTE) 0x26
72#define SRV_TDS_VARCHAR (BYTE) 0x27
73#define SRV_TDS_BINARY (BYTE) 0x2d
74#define SRV_TDS_IMAGE (BYTE) 0x22
75#define SRV_TDS_CHAR (BYTE) 0x2f
76#define SRV_TDS_INT1 (BYTE) 0x30
77#define SRV_TDS_BIT (BYTE) 0x32
78#define SRV_TDS_INT2 (BYTE) 0x34
79#define SRV_TDS_DECIMAL (BYTE) 0x37
80#define SRV_TDS_INT4 (BYTE) 0x38
81#define SRV_TDS_DATETIM4 (BYTE) 0x3a
82#define SRV_TDS_FLT4 (BYTE) 0x3b
83#define SRV_TDS_MONEY (BYTE) 0x3c
84#define SRV_TDS_DATETIME (BYTE) 0x3d
85#define SRV_TDS_FLT8 (BYTE) 0x3e
86#define SRV_TDS_NUMERIC (BYTE) 0x3f
87#define SRV_TDS_SSVARIANT (BYTE) 0x62
88#define SRV_TDS_NTEXT (BYTE) 0x63
89#define SRV_TDS_BITN (BYTE) 0x68
90#define SRV_TDS_DECIMALN (BYTE) 0x6a
91#define SRV_TDS_NUMERICN (BYTE) 0x6c
92#define SRV_TDS_FLTN (BYTE) 0x6d
93#define SRV_TDS_MONEYN (BYTE) 0x6e
94#define SRV_TDS_DATETIMN (BYTE) 0x6f
95#define SRV_TDS_MONEY4 (BYTE) 0x7a
96#define SRV_TDS_INT8 (BYTE) 0x7f
97#define SRV_TDS_BIGVARBINARY (BYTE) 0xA5
98#define SRV_TDS_BIGVARCHAR (BYTE) 0xA7
99#define SRV_TDS_BIGBINARY (BYTE) 0xAD
100#define SRV_TDS_BIGCHAR (BYTE) 0xAF
101#define SRV_TDS_NVARCHAR (BYTE) 0xe7
102#define SRV_TDS_NCHAR (BYTE) 0xef
103
104#define SRVNULL SRV_TDS_NULL
105#define SRVTEXT SRV_TDS_TEXT
106#define SRVGUID SRV_TDS_GUID
107#define SRVVARBINARY SRV_TDS_VARBINARY
108#define SRVINTN SRV_TDS_INTN
109#define SRVVARCHAR SRV_TDS_VARCHAR
110#define SRVBINARY SRV_TDS_BINARY
111#define SRVIMAGE SRV_TDS_IMAGE
112#define SRVCHAR SRV_TDS_CHAR
113#define SRVINT1 SRV_TDS_INT1
114#define SRVBIT SRV_TDS_BIT
115#define SRVINT2 SRV_TDS_INT2
116#define SRVDECIMAL SRV_TDS_DECIMAL
117#define SRVINT4 SRV_TDS_INT4
118#define SRVDATETIM4 SRV_TDS_DATETIM4
119#define SRVFLT4 SRV_TDS_FLT4
120#define SRVMONEY SRV_TDS_MONEY
121#define SRVDATETIME SRV_TDS_DATETIME
122#define SRVFLT8 SRV_TDS_FLT8
123#define SRVNUMERIC SRV_TDS_NUMERIC
124#define SRVSSVARIANT SRV_TDS_SSVARIANT
125#define SRVNTEXT SRV_TDS_NTEXT
126#define SRVBITN SRV_TDS_BITN
127#define SRVDECIMALN SRV_TDS_DECIMALN
128#define SRVNUMERICN SRV_TDS_NUMERICN
129#define SRVFLTN SRV_TDS_FLTN
130#define SRVMONEYN SRV_TDS_MONEYN
131#define SRVDATETIMN SRV_TDS_DATETIMN
132#define SRVMONEY4 SRV_TDS_MONEY4
133#define SRVINT8 SRV_TDS_INT8
134#define SRVBIGVARBINARY SRV_TDS_BIGVARBINARY
135#define SRVBIGVARCHAR SRV_TDS_BIGVARCHAR
136#define SRVBIGBINARY SRV_TDS_BIGBINARY
137#define SRVBIGCHAR SRV_TDS_BIGCHAR
138#define SRVNVARCHAR SRV_TDS_NVARCHAR
139#define SRVNCHAR SRV_TDS_NCHAR
140
141#define SRV_ERROR 0
142#define SRV_DONE 1
143#define SRV_DATATYPE 2
144#define SRV_EVENT 4
145
146#define SRV_ENO_OS_ERR 0
147#define SRV_INFO 1
148#define SRV_FATAL_PROCESS 10
149#define SRV_FATAL_SERVER 19
150
151#define SRV_CONTINUE 0
152#define SRV_LANGUAGE 1
153#define SRV_CONNECT 2
154#define SRV_RPC 3
155#define SRV_RESTART 4
156#define SRV_DISCONNECT 5
157#define SRV_ATTENTION 6
158#define SRV_SLEEP 7
159#define SRV_START 8
160#define SRV_STOP 9
161#define SRV_EXIT 10
162#define SRV_CANCEL 11
163#define SRV_SETUP 12
164#define SRV_CLOSE 13
165#define SRV_PRACK 14
166#define SRV_PRERROR 15
167#define SRV_ATTENTION_ACK 16
168#define SRV_CONNECT_V7 16
169#define SRV_SKIP 17
170#define SRV_TRANSMGR 18
171#define SRV_PRELOGIN 19
172#define SRV_OLEDB 20
173#define SRV_INTERNAL_HANDLER 99
174#define SRV_PROGRAMMER_DEFINED 100
175
176#define SRV_SERVERNAME 0
177#define SRV_VERSION 6
178
179#define SRV_NULLTERM -1
180
181#define SRV_MSG_INFO 1
182#define SRV_MSG_ERROR 2
183
184#define SRV_DONE_FINAL (USHORT) 0x0000
185#define SRV_DONE_MORE (USHORT) 0x0001
186#define SRV_DONE_ERROR (USHORT) 0x0002
187#define SRV_DONE_COUNT (USHORT) 0x0010
188#define SRV_DONE_RPC_IN_BATCH (USHORT) 0x0080
189
190#define SRV_PARAMRETURN 0x0001
191#define SRV_PARAMDEFAULT 0x0002
192#define SRV_PARAMSORTORDER 0x0004
193
194#define SRV_RECOMPILE 0x0001
195#define SRV_NOMETADATA 0x0002
196
197#define SRV_SPID 10
198#define SRV_NETSPID 11
199#define SRV_TYPE 12
200#define SRV_STATUS 13
201#define SRV_RMTSERVER 14
202#define SRV_HOST 15
203#define SRV_USER 16
204#define SRV_PWD 17
205#define SRV_CPID 18
206#define SRV_APPLNAME 19
207#define SRV_TDS 20
208#define SRV_CLIB 21
209#define SRV_LIBVERS 22
210#define SRV_ROWSENT 23
211#define SRV_BCPFLAG 24
212#define SRV_NATLANG 25
213#define SRV_PIPEHANDLE 26
214#define SRV_NETWORK_MODULE 27
215#define SRV_NETWORK_VERSION 28
216#define SRV_NETWORK_CONNECTION 29
217#define SRV_LSECURE 30
218#define SRV_SAXP 31
219#define SRV_UNICODE_USER 33
220#define SRV_UNICODE_PWD 35
221#define SRV_SPROC_CODEPAGE 36
222#define SRV_MSGLCID 37
223#define SRV_INSTANCENAME 38
224#define SRV_HASHPWD 39
225#define SRV_UNICODE_CURRENTLOGIN 40
226
227#define SRV_TDS_NONE 0
228#define SRV_TDS_2_0 1
229#define SRV_TDS_3_4 2
230#define SRV_TDS_4_2 3
231#define SRV_TDS_6_0 4
232#define SRV_TDS_7_0 5
233
234 typedef int SRVRETCODE;
235#ifndef ODBCVER
236 typedef int RETCODE;
237#endif
238
239#ifndef SUCCEED
240#define SUCCEED 1
241#endif
242
243#ifndef FAIL
244#define FAIL 0
245#endif
246
247#define SRV_DUPLICATE_HANDLER 2
248
249#ifndef COMPILE_FOR_CLR
250 struct srv_server;
251 typedef struct srv_server SRV_SERVER;
252
253 struct srv_config;
254 typedef struct srv_config SRV_CONFIG;
255
256 struct CXPData;
257 typedef struct CXPData SRV_PROC;
258
259 int __cdecl srv_describe(SRV_PROC *,int,char*,int,__LONG32,__LONG32,__LONG32,__LONG32,void *);
260 int __cdecl srv_setutype(SRV_PROC *srvproc,int column,__LONG32 usertype);
261 int __cdecl srv_setcoldata(SRV_PROC *srvproc,int column,void *data);
262 int __cdecl srv_setcollen(SRV_PROC *srvproc,int column,int len);
263 int __cdecl srv_sendrow(SRV_PROC *srvproc);
264 int __cdecl srv_senddone(SRV_PROC *srvproc,USHORT status,USHORT curcmd,__LONG32 count);
265 int __cdecl srv_rpcparams(SRV_PROC *);
266 int __cdecl srv_paraminfo(SRV_PROC *,int,BYTE *,ULONG *,ULONG *,BYTE *,WINBOOL *);
267 int __cdecl srv_paramsetoutput(SRV_PROC *,int,BYTE *,ULONG,WINBOOL);
268 void *__cdecl srv_paramdata(SRV_PROC *,int);
269 int __cdecl srv_paramlen(SRV_PROC *,int);
270 int __cdecl srv_parammaxlen(SRV_PROC *,int);
271 int __cdecl srv_paramtype(SRV_PROC *,int);
272 int __cdecl srv_paramset(SRV_PROC *,int,void *,int);
273 char *__cdecl srv_paramname(SRV_PROC *,int,int*);
274 int __cdecl srv_paramnumber(SRV_PROC *,char*,int);
275
276#define SRV_GETSERVER(a) srv_getserver (a)
277#define SRV_GOT_ATTENTION(a) srv_got_attention (a)
278#define SRV_TDSVERSION(a) srv_tdsversion (a)
279
280 SRV_SERVER *__cdecl srv_getserver(SRV_PROC *srvproc);
281 WINBOOL __cdecl srv_got_attention(SRV_PROC *srvproc);
282
283 void *__cdecl srv_alloc(__LONG32 ulSize);
284 int __cdecl srv_bmove(void *from,void *to,__LONG32 count);
285 int __cdecl srv_bzero(void *location,__LONG32 count);
286 int __cdecl srv_free(void *ptr);
287 int __cdecl srv_convert(SRV_PROC *,int,void *,__LONG32,int,void *,__LONG32);
288 void *__cdecl srv_getuserdata(SRV_PROC *srvproc);
289 int __cdecl srv_getbindtoken(SRV_PROC *srvproc,char *token_buf);
290 int __cdecl srv_getdtcxact(SRV_PROC *srvproc,void **ppv);
291
292 typedef int (*EventHandler)(void *);
293
294 int __cdecl srv_impersonate_client(SRV_PROC *srvproc);
295 __LONG32 __cdecl srv_langcpy(SRV_PROC *srvproc,__LONG32 start,__LONG32 nbytes,char *buffer);
296 __LONG32 __cdecl srv_langlen(SRV_PROC *srvproc);
297 void *__cdecl srv_langptr(SRV_PROC *srvproc);
298
299 int __cdecl srv_log(SRV_SERVER *server,WINBOOL datestamp,char *msg,int msglen);
300 int __cdecl srv_paramstatus(SRV_PROC *,int);
301 void *__cdecl srv_pfieldex(SRV_PROC *srvproc,int field,int *len);
302 char *__cdecl srv_pfield(SRV_PROC *srvproc,int field,int *len);
303 int __cdecl srv_returnval(SRV_PROC *srvproc,char *valuename,int len,BYTE status,__LONG32 type,__LONG32 maxlen,__LONG32 datalen,void *value);
304 int __cdecl srv_revert_to_self(SRV_PROC *srvproc);
305 char *__cdecl srv_rpcdb(SRV_PROC *srvproc,int *len);
306 char *__cdecl srv_rpcname(SRV_PROC *srvproc,int *len);
307 int __cdecl srv_rpcnumber(SRV_PROC *srvproc);
308 USHORT __cdecl srv_rpcoptions(SRV_PROC *srvproc);
309 char *__cdecl srv_rpcowner(SRV_PROC *srvproc,int *len);
310 int __cdecl srv_wsendmsg(SRV_PROC *srvproc,__LONG32 msgnum,BYTE msgclass,WCHAR *message,int msglen);
311 int __cdecl srv_sendmsg(SRV_PROC *srvproc,int msgtype,__LONG32 msgnum,BYTE msgclass,BYTE state,char *rpcname,int rpcnamelen,USHORT linenum,char *message,int msglen);
312 int __cdecl srv_sendstatus(SRV_PROC *srvproc,__LONG32 status);
313 int __cdecl srv_setuserdata(SRV_PROC *srvproc,void *ptr);
314 char *__cdecl srv_sfield(SRV_SERVER *server,int field,int *len);
315 char *__cdecl srv_symbol(int type,int symbol,int *len);
316 int __cdecl srv_tdsversion(SRV_PROC *srvproc);
317 WINBOOL __cdecl srv_willconvert(int srctype,int desttype);
318 int __cdecl srv_terminatethread(SRV_PROC *srvproc);
319 int __cdecl srv_sendstatistics(SRV_PROC *srvproc);
320 int __cdecl srv_clearstatistics(SRV_PROC *srvproc);
321 int __cdecl srv_message_handler(SRV_PROC *srvproc,int errornum,BYTE severity,BYTE state,int oserrnum,char *errtext,int errtextlen,char *oserrtext,int oserrtextlen);
322 int __cdecl srv_pre_handle(SRV_SERVER *server,SRV_PROC *srvproc,__LONG32 event,EventHandler handler,WINBOOL remove);
323 int __cdecl srv_post_handle(SRV_SERVER *server,SRV_PROC *srvproc,__LONG32 event,EventHandler handler,WINBOOL remove);
324 int __cdecl srv_IgnoreAnsiToOem(SRV_PROC *srvproc,WINBOOL bTF);
325#endif
326
327#ifdef __cplusplus
328}
329#endif
330
331#pragma pack()
332
333#define SS_MAJOR_VERSION 7
334#define SS_MINOR_VERSION 00
335#define SS_LEVEL_VERSION 0000
336#define SS_MINIMUM_VERSION "7.00.00.0000"
337#define ODS_VERSION ((SS_MAJOR_VERSION << 24) | (SS_MINOR_VERSION << 16))
338#endif
Note: See TracBrowser for help on using the repository browser.