1 | /*
|
---|
2 | * Copyright (C) 2006 Mike McCormack
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | typedef DWORD DBKIND;
|
---|
29 |
|
---|
30 | enum DBKINDENUM {
|
---|
31 | DBKIND_GUID_NAME,
|
---|
32 | DBKIND_GUID_PROPID,
|
---|
33 | DBKIND_NAME,
|
---|
34 | DBKIND_PGUID_NAME,
|
---|
35 | DBKIND_PGUID_PROPID,
|
---|
36 | DBKIND_PROPID,
|
---|
37 | DBKIND_GUID,
|
---|
38 | };
|
---|
39 |
|
---|
40 | typedef struct tagDBID {
|
---|
41 | [switch_type(DBKIND), switch_is(eKind)] union
|
---|
42 | {
|
---|
43 | [case(DBKIND_GUID_NAME, DBKIND_GUID_PROPID, DBKIND_GUID, DBKIND_NAME, DBKIND_PROPID)]
|
---|
44 | GUID guid;
|
---|
45 | [case(DBKIND_PGUID_NAME, DBKIND_PGUID_PROPID)]
|
---|
46 | GUID *pguid;
|
---|
47 | [default]
|
---|
48 | ;
|
---|
49 | } uGuid;
|
---|
50 | DBKIND eKind;
|
---|
51 | [switch_type(DBKIND), switch_is(eKind)] union
|
---|
52 | {
|
---|
53 | [case(DBKIND_GUID_NAME, DBKIND_NAME, DBKIND_PGUID_NAME)]
|
---|
54 | LPOLESTR pwszName;
|
---|
55 | [case(DBKIND_GUID_PROPID, DBKIND_GUID, DBKIND_PGUID_PROPID, DBKIND_PROPID)]
|
---|
56 | ULONG ulPropid;
|
---|
57 | [default]
|
---|
58 | ;
|
---|
59 | } uName;
|
---|
60 | } DBID;
|
---|
61 |
|
---|
62 | typedef DWORD DBPROPID;
|
---|
63 |
|
---|
64 | typedef struct tagDBPROPIDSET {
|
---|
65 | [size_is(cPropertyIDs)] DBPROPID *rgPropertyIDs;
|
---|
66 | ULONG cPropertyIDs;
|
---|
67 | GUID guidPropertySet;
|
---|
68 | } DBPROPIDSET;
|
---|
69 |
|
---|
70 | typedef DWORD DBPROPOPTIONS;
|
---|
71 |
|
---|
72 | enum DBPROPOPTIONENUM {
|
---|
73 | DBPROPOPTIONS_REQUIRED = 0,
|
---|
74 | DBPROPOPTIONS_SETIFCHEAP = 1,
|
---|
75 | DBPROPOPTIONS_OPTIONAL = 1,
|
---|
76 | };
|
---|
77 |
|
---|
78 | typedef DWORD DBPROPSTATUS;
|
---|
79 |
|
---|
80 | typedef struct tagDBPROP {
|
---|
81 | DBPROPID dwPropertyID;
|
---|
82 | DBPROPOPTIONS dwOptions;
|
---|
83 | DBPROPSTATUS dwStatus;
|
---|
84 | DBID colid;
|
---|
85 | VARIANT vValue;
|
---|
86 | } DBPROP;
|
---|
87 |
|
---|
88 | typedef struct tagDBPROPSET {
|
---|
89 | [size_is(cProperties)] DBPROP *rgProperties;
|
---|
90 | ULONG cProperties;
|
---|
91 | GUID guidPropertySet;
|
---|
92 | } DBPROPSET;
|
---|
93 |
|
---|
94 | typedef DWORD DBPROPFLAGS;
|
---|
95 |
|
---|
96 | typedef struct tagDBPROPINFO {
|
---|
97 | LPOLESTR pwszDescription;
|
---|
98 | DBPROPID dwPropertyID;
|
---|
99 | DBPROPFLAGS dwFlags;
|
---|
100 | VARTYPE vtType;
|
---|
101 | VARIANT vValues;
|
---|
102 | } DBPROPINFO;
|
---|
103 |
|
---|
104 | typedef DBPROPINFO *PDBPROPINFO;
|
---|
105 |
|
---|
106 | typedef struct tagDBPROPINFOSET {
|
---|
107 | [size_is(cPropertyInfos)] PDBPROPINFO rgPropertyInfos;
|
---|
108 | ULONG cPropertyInfos;
|
---|
109 | GUID guidPropertySet;
|
---|
110 | } DBPROPINFOSET;
|
---|