2 * Copyright (C) 2006 Mike McCormack
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 typedef struct tagDBID
{
32 [switch_type(DBKIND
), switch_is(eKind
)] union
34 [case(DBKIND_GUID_NAME
, DBKIND_GUID_PROPID
, DBKIND_GUID
, DBKIND_NAME
, DBKIND_PROPID
)]
36 [case(DBKIND_PGUID_NAME
, DBKIND_PGUID_PROPID
)]
42 [switch_type(DBKIND
), switch_is(eKind
)] union
44 [case(DBKIND_GUID_NAME
, DBKIND_NAME
, DBKIND_PGUID_NAME
)]
46 [case(DBKIND_GUID_PROPID
, DBKIND_GUID
, DBKIND_PGUID_PROPID
, DBKIND_PROPID
)]
53 typedef DWORD DBPROPID
;
55 typedef struct tagDBPROPIDSET
{
56 [size_is(cPropertyIDs
)] DBPROPID
*rgPropertyIDs
;
61 typedef DWORD DBPROPOPTIONS
;
63 enum DBPROPOPTIONENUM
{
64 DBPROPOPTIONS_REQUIRED
= 0,
65 DBPROPOPTIONS_SETIFCHEAP
= 1,
66 DBPROPOPTIONS_OPTIONAL
= 1,
69 typedef DWORD DBPROPSTATUS
;
71 typedef struct tagDBPROP
{
72 DBPROPID dwPropertyID
;
73 DBPROPOPTIONS dwOptions
;
74 DBPROPSTATUS dwStatus
;
79 typedef struct tagDBPROPSET
{
80 [size_is(cProperties
)] DBPROP
*rgProperties
;
85 typedef DWORD DBPROPFLAGS
;
87 typedef struct tagDBPROPINFO
{
88 LPOLESTR pwszDescription
;
89 DBPROPID dwPropertyID
;
95 typedef DBPROPINFO
*PDBPROPINFO
;
97 typedef struct tagDBPROPINFOSET
{
98 [size_is(cPropertyInfos
)] PDBPROPINFO rgPropertyInfos
;
100 GUID guidPropertySet
;
103 typedef DWORD DBBINDURLFLAG
;
104 typedef DWORD DBBINDURLSTATUS
;
106 typedef struct tagDBIMPLICITSESSION
126 DBTYPE_IDISPATCH
= 9,
130 DBTYPE_IUNKNOWN
= 13,
142 DBTYPE_NUMERIC
= 131,
146 DBTYPE_DBTIMESTAMP
= 135,
148 DBTYPE_VECTOR
= 0x1000,
149 DBTYPE_ARRAY
= 0x2000,
150 DBTYPE_BYREF
= 0x4000,
151 DBTYPE_RESERVED
= 0x8000
156 DBTYPE_HCHAPTER
= 136
161 DBTYPE_FILETIME
= 64,
162 DBTYPE_PROPVARIANT
= 138,
163 DBTYPE_VARNUMERIC
= 139
166 typedef DWORD DBSTATUS
;
171 DBSTATUS_E_BADACCESSOR
= 1,
172 DBSTATUS_E_CANTCONVERTVALUE
= 2,
173 DBSTATUS_S_ISNULL
= 3,
174 DBSTATUS_S_TRUNCATED
= 4,
175 DBSTATUS_E_SIGNMISMATCH
= 5,
176 DBSTATUS_E_DATAOVERFLOW
= 6,
177 DBSTATUS_E_CANTCREATE
= 7,
178 DBSTATUS_E_UNAVAILABLE
= 8,
179 DBSTATUS_E_PERMISSIONDENIED
= 9,
180 DBSTATUS_E_INTEGRITYVIOLATION
= 10,
181 DBSTATUS_E_SCHEMAVIOLATION
= 11,
182 DBSTATUS_E_BADSTATUS
= 12,
183 DBSTATUS_S_DEFAULT
= 13
186 cpp_quote
("#ifdef DBINITCONSTANTS")
187 cpp_quote
("#ifdef __cplusplus")
188 cpp_quote
("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\")
189 cpp_quote
(" EXTERN_C const GUID name DECLSPEC_HIDDEN; \\")
190 cpp_quote
(" EXTERN_C const GUID name = \\")
191 cpp_quote
(" { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }")
193 cpp_quote
("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\")
194 cpp_quote
(" const GUID name DECLSPEC_HIDDEN; \\")
195 cpp_quote
(" const GUID name = \\")
196 cpp_quote
(" { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }")
199 cpp_quote
("#define DEFINE_DBGUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \\")
200 cpp_quote
(" EXTERN_C const GUID name DECLSPEC_HIDDEN")
203 cpp_quote
("DEFINE_DBGUID(DBGUID_SESSION, 0xc8b522f5, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
204 cpp_quote
("DEFINE_DBGUID(DBGUID_ROWSET, 0xc8b522f6, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
205 cpp_quote
("DEFINE_DBGUID(DBGUID_ROW, 0xc8b522f7, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
206 cpp_quote
("DEFINE_DBGUID(DBGUID_STREAM, 0xc8b522f9, 0x5cf3, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);")
208 typedef struct tagDBCOLUMNACCESS
215 DB_DWRESERVE dwReserved
;
221 typedef DWORD DBROWSTATUS
;
225 DBROWSTATUS_S_OK
= 0,
227 DBROWSTATUS_E_FAIL
= 19,
231 typedef DWORD DBPART
;
241 typedef DWORD DBPARAMIO
;
245 DBPARAMIO_NOTPARAM
= 0,
247 DBPARAMIO_OUTPUT
= 2,
250 typedef DWORD DBMEMOWNER
;
254 DBMEMOWNER_CLIENTOWNED
= 0,
255 DBMEMOWNER_PROVIDEROWNED
= 1,
258 typedef struct tagDBOBJECT
264 typedef struct tagDBBINDEXT
266 [size_is((ULONG
)ulExtension
)] BYTE *pExtension
;
267 DBCOUNTITEM ulExtension
;
270 typedef struct tagDBBINDING
273 DBBYTEOFFSET obValue
;
274 DBBYTEOFFSET obLength
;
275 DBBYTEOFFSET obStatus
;
276 ITypeInfo
*pTypeInfo
;
280 DBMEMOWNER dwMemOwner
;
289 typedef ULONG_PTR HACCESSOR
;
291 cpp_quote
("#define DB_INVALID_HACCESSOR 0x00")
293 typedef ULONG_PTR HROW
;
295 cpp_quote
("#define DB_NULL_HROW 0x00")
297 typedef ULONG_PTR HWATCHREGION
;
299 cpp_quote
("#define DBWATCHREGION_NULL NULL")
301 typedef ULONG_PTR HCHAPTER
;
303 cpp_quote
("#define DB_NULL_HCHAPTER 0x00")
305 typedef struct tagDBPARAMS
308 DB_UPARAMS cParamSets
;
312 typedef DWORD DBASYNCHOP
;
319 typedef DWORD DBASYNCHPHASE
;
321 enum DBASYNCHPHASEENUM
323 DBASYNCHPHASE_INITIALIZATION
,
324 DBASYNCHPHASE_POPULATION
,
325 DBASYNCHPHASE_COMPLETE
,
326 DBASYNCHPHASE_CANCELED
,
329 typedef struct tagRMTPACK
331 ISequentialStream
*pISeqStream
;
334 [size_is(cBSTR
)] BSTR *rgBSTR
;
336 [size_is(cVARIANT
)] VARIANT *rgVARIANT
;
338 [size_is(cIDISPATCH
)] IDispatch
**rgIDISPATCH
;
340 [size_is(cIUNKNOWN
)] IUnknown
**rgIUNKNOWN
;
342 [size_is(cPROPVARIANT
)] PROPVARIANT
*rgPROPVARIANT
;
344 [size_is(cArray
)] VARIANT *rgArray
;