Return flag for DRVM_MAPPER_PREFERRED_GET.
[wine.git] / include / propidl.idl
blob1e7dc4718f1a3b093240934a62b278d1b8e2781c
1 /*
2 * Copyright 2002 Ove Kaaven
3 * Copyright 2004 Francois Gouget
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 import "objidl.idl";
21 import "oaidl.idl";
24 /******************** Property Storage ********************/
26 interface IEnumSTATPROPSTG;
27 interface IEnumSTATPROPSETSTG;
30 object,
31 uuid(00000138-0000-0000-C000-000000000046),
32 pointer_default(unique)
34 interface IPropertyStorage : IUnknown
36 typedef [unique] IPropertyStorage *LPPROPERTYSTORAGE;
38 const DWORD PROPSETFLAG_DEFAULT = 0;
39 const DWORD PROPSETFLAG_NONSIMPLE = 1;
40 const DWORD PROPSETFLAG_ANSI = 2;
41 const DWORD PROPSETFLAG_UNBUFFERED = 4;
43 typedef struct tagPROPVARIANT PROPVARIANT;
45 #define TYPEDEF_CA(type, name) \
46 typedef struct tag##name { \
47 ULONG cElems; \
48 [size_is(cElems)] \
49 type *pElems; \
50 } name
52 TYPEDEF_CA(unsigned char, CAUB);
53 TYPEDEF_CA(short, CAI);
54 TYPEDEF_CA(USHORT, CAUI);
55 TYPEDEF_CA(long, CAL);
56 TYPEDEF_CA(ULONG, CAUL);
57 TYPEDEF_CA(float, CAFLT);
58 TYPEDEF_CA(double, CADBL);
59 TYPEDEF_CA(CY, CACY);
60 TYPEDEF_CA(DATE, CADATE);
61 TYPEDEF_CA(BSTR, CABSTR);
62 TYPEDEF_CA(BSTRBLOB, CABSTRBLOB);
63 TYPEDEF_CA(VARIANT_BOOL, CABOOL);
64 TYPEDEF_CA(SCODE, CASCODE);
65 TYPEDEF_CA(PROPVARIANT, CAPROPVARIANT);
66 TYPEDEF_CA(LARGE_INTEGER, CAH);
67 TYPEDEF_CA(ULARGE_INTEGER, CAUH);
68 TYPEDEF_CA(LPSTR, CALPSTR);
69 TYPEDEF_CA(LPWSTR, CALPWSTR);
70 TYPEDEF_CA(FILETIME, CAFILETIME);
71 TYPEDEF_CA(CLIPDATA, CACLIPDATA);
72 TYPEDEF_CA(CLSID, CACLSID);
74 struct tagPROPVARIANT {
75 VARTYPE vt;
76 WORD wReserved1;
77 WORD wReserved2;
78 WORD wReserved3;
79 [switch_is(vt & 0x1fff)] union {
80 [case(VT_EMPTY, VT_NULL)] ;
81 [case(VT_I1)] char cVal;
82 [case(VT_UI1)] UCHAR bVal;
83 [case(VT_I2)] short iVal;
84 [case(VT_UI2)] USHORT uiVal;
85 [case(VT_BOOL)] VARIANT_BOOL boolVal;
86 #if 0 /* illegal in C++ */
87 [case(VT_ILLEGAL)] _VARIANT_BOOL bool;
88 #endif
89 [case(VT_I4)] long lVal;
90 [case(VT_UI4)] ULONG ulVal;
91 [case(VT_R4)] float fltVal;
92 [case(VT_ERROR)] SCODE scode;
93 [case(VT_I8)] LARGE_INTEGER hVal;
94 [case(VT_UI8)] ULARGE_INTEGER uhVal;
95 [case(VT_R8)] double dblVal;
96 [case(VT_CY)] CY cyVal;
97 [case(VT_DATE)] DATE date;
98 [case(VT_FILETIME)] FILETIME filetime;
99 [case(VT_CLSID)] CLSID *puuid;
100 [case(VT_BLOB, VT_BLOB_OBJECT)] BLOB blob;
101 [case(VT_CF)] CLIPDATA *pclipdata;
102 [case(VT_STREAM, VT_STREAMED_OBJECT)] IStream *pStream;
103 [case(VT_STORAGE, VT_STORED_OBJECT)] IStorage *pStorage;
104 [case(VT_BSTR)] BSTR bstrVal;
105 [case(VT_BSTR_BLOB)] BSTRBLOB bstrblobVal;
106 [case(VT_LPSTR)] LPSTR pszVal;
107 [case(VT_LPWSTR)] LPWSTR pwszVal;
108 [case(VT_UI1|VT_VECTOR)] CAUB caub;
109 [case(VT_I2|VT_VECTOR)] CAI cai;
110 [case(VT_UI2|VT_VECTOR)] CAUI caui;
111 [case(VT_BOOL|VT_VECTOR)] CABOOL cabool;
112 [case(VT_I4|VT_VECTOR)] CAL cal;
113 [case(VT_UI4|VT_VECTOR)] CAUL caul;
114 [case(VT_R4|VT_VECTOR)] CAFLT caflt;
115 [case(VT_ERROR|VT_VECTOR)] CASCODE cascode;
116 [case(VT_I8|VT_VECTOR)] CAH cah;
117 [case(VT_UI8|VT_VECTOR)] CAUH cauh;
118 [case(VT_R8|VT_VECTOR)] CADBL cadbl;
119 [case(VT_CY|VT_VECTOR)] CACY cacy;
120 [case(VT_DATE|VT_VECTOR)] CADATE cadate;
121 [case(VT_FILETIME|VT_VECTOR)] CAFILETIME cafiletime;
122 [case(VT_CLSID|VT_VECTOR)] CACLSID cauuid;
123 [case(VT_CF|VT_VECTOR)] CACLIPDATA caclipdata;
124 [case(VT_BSTR|VT_VECTOR)] CABSTR cabstr;
125 [case(VT_BSTR_BLOB|VT_VECTOR)] CABSTRBLOB cabstrblob;
126 [case(VT_LPSTR|VT_VECTOR)] CALPSTR calpstr;
127 [case(VT_LPWSTR|VT_VECTOR)] CALPWSTR calpwstr;
128 [case(VT_VARIANT|VT_VECTOR)] CAPROPVARIANT capropvar;
132 typedef struct tagPROPVARIANT *LPPROPVARIANT;
134 /* FIXME: bunches of property IDs */
136 const ULONG PRSPEC_INVALID = 0xffffffff;
137 const ULONG PRSPEC_LPWSTR = 0;
138 const ULONG PRSPEC_PROPID = 1;
140 typedef struct tagPROPSPEC {
141 ULONG ulKind;
142 [switch_is(ulKind)] union {
143 [case(PRSPEC_PROPID)] PROPID propid;
144 [case(PRSPEC_LPWSTR)] LPOLESTR lpwstr;
145 [default] ;
147 } PROPSPEC;
149 typedef struct tagSTATPROPSTG {
150 LPOLESTR lpwstrName;
151 PROPID propid;
152 VARTYPE vt;
153 } STATPROPSTG;
155 /* FIXME: macros */
157 typedef struct tagSTATPROPSETSTG {
158 FMTID fmtid;
159 CLSID clsid;
160 DWORD grfFlags;
161 FILETIME mtime;
162 FILETIME ctime;
163 FILETIME atime;
164 DWORD dwOSVersion;
165 } STATPROPSETSTG;
167 HRESULT ReadMultiple(
168 [in] ULONG cpspec,
169 [in, size_is(cpspec)] const PROPSPEC rgpspec[],
170 [out, size_is(cpspec)] PROPVARIANT rgpropvar[]);
172 HRESULT WriteMultiple(
173 [in] ULONG cpspec,
174 [in, size_is(cpspec)] const PROPSPEC rgpspec[],
175 [in, size_is(cpspec)] const PROPVARIANT rgpropvar[],
176 [in] PROPID propidNameFirst);
178 HRESULT DeleteMultiple(
179 [in] ULONG cpspec,
180 [in, size_is(cpspec)] const PROPSPEC rgpspec[]);
182 HRESULT ReadPropertyNames(
183 [in] ULONG cpropid,
184 [in, size_is(cpropid)] const PROPID rgpropid[],
185 [out, size_is(cpropid)] LPOLESTR rglpwstrName[]);
187 HRESULT WritePropertyNames(
188 [in] ULONG cpropid,
189 [in, size_is(cpropid)] const PROPID rgpropid[],
190 [in, size_is(cpropid)] const LPOLESTR rglpwstrName[]);
192 HRESULT DeletePropertyNames(
193 [in] ULONG cpropid,
194 [in, size_is(cpropid)] const PROPID rgpropid[]);
196 HRESULT Commit(
197 [in] DWORD grfCommitFlags);
199 HRESULT Revert();
201 HRESULT Enum(
202 [out] IEnumSTATPROPSTG **ppenum);
204 HRESULT SetTimes(
205 [in] const FILETIME *pctime,
206 [in] const FILETIME *patime,
207 [in] const FILETIME *pmtime);
209 HRESULT SetClass(
210 [in] REFCLSID clsid);
212 HRESULT Stat(
213 [out] STATPROPSETSTG *statpsstg);
217 object,
218 uuid(0000013A-0000-0000-C000-000000000046),
219 pointer_default(unique)
221 interface IPropertySetStorage : IUnknown
223 typedef [unique] IPropertySetStorage *LPPROPERTYSETSTORAGE;
225 HRESULT Create(
226 [in] REFFMTID rfmtid,
227 [in, unique] const CLSID *pclsid,
228 [in] DWORD grfFlags,
229 [in] DWORD grfMode,
230 [out] IPropertyStorage **ppprstg);
232 HRESULT Open(
233 [in] REFFMTID rfmtid,
234 [in] DWORD grfMode,
235 [out] IPropertyStorage **ppprstg);
237 HRESULT Delete(
238 [in] REFFMTID rfmtid);
240 HRESULT Enum(
241 [out] IEnumSTATPROPSETSTG **ppenum);
245 object,
246 uuid(00000139-0000-0000-C000-000000000046),
247 pointer_default(unique)
249 interface IEnumSTATPROPSTG : IUnknown
251 typedef [unique] IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
253 [local]
254 HRESULT Next(
255 [in] ULONG celt,
256 [out, size_is(celt), length_is(*pceltFetched)]
257 STATPROPSTG *rgelt,
258 [out] ULONG *pceltFetched);
260 [call_as(Next)]
261 HRESULT RemoteNext(
262 [in] ULONG celt,
263 [out, size_is(celt), length_is(*pceltFetched)]
264 STATPROPSTG *rgelt,
265 [out] ULONG *pceltFetched);
267 HRESULT Skip(
268 [in] ULONG celt);
270 HRESULT Reset();
272 HRESULT Clone(
273 [out] IEnumSTATPROPSTG **ppenum);
277 object,
278 uuid(0000013B-0000-0000-C000-000000000046),
279 pointer_default(unique)
281 interface IEnumSTATPROPSETSTG : IUnknown
283 typedef [unique] IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
285 [local]
286 HRESULT Next(
287 [in] ULONG celt,
288 [out, size_is(celt), length_is(*pceltFetched)]
289 STATPROPSETSTG *rgelt,
290 [out] ULONG *pceltFetched);
292 [call_as(Next)]
293 HRESULT RemoteNext(
294 [in] ULONG celt,
295 [out, size_is(celt), length_is(*pceltFetched)]
296 STATPROPSETSTG *rgelt,
297 [out] ULONG *pceltFetched);
299 HRESULT Skip(
300 [in] ULONG celt);
302 HRESULT Reset();
304 HRESULT Clone(
305 [out] IEnumSTATPROPSETSTG **ppenum);
309 cpp_quote("HRESULT WINAPI FreePropVariantArray(ULONG,PROPVARIANT*);");
310 cpp_quote("HRESULT WINAPI PropVariantClear(PROPVARIANT*);");
311 cpp_quote("HRESULT WINAPI PropVariantCopy(PROPVARIANT*,const PROPVARIANT*);");