Added implementation of DllCanUnloadNow.
[wine/multimedia.git] / include / propidl.idl
bloba5d38125810f0bdacf8fec34e2d2ed995550401d
1 /*
2 * Copyright 2002 Ove Kaaven
3 * Copyright 2004 Francois Gouget
4 * Copyright 2005 Juan Lang
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 import "objidl.idl";
22 import "oaidl.idl";
26 * Windows SDK braindamage alert
28 * PID_DICTIONARY and PID_CODEPAGE are defined by msidefs.h too
29 * PID_SECURITY is defined in msidefs.h with a different value!
30 * So these need to be undefined first.
32 cpp_quote("#ifdef PID_DICTIONARY");
33 cpp_quote("#undef PID_DICTIONARY");
34 cpp_quote("#endif");
36 cpp_quote("#ifdef PID_CODEPAGE");
37 cpp_quote("#undef PID_CODEPAGE");
38 cpp_quote("#endif");
40 cpp_quote("#ifdef PID_SECURITY");
41 cpp_quote("#undef PID_SECURITY");
42 cpp_quote("#endif");
44 /******************** Property Storage ********************/
46 interface IEnumSTATPROPSTG;
47 interface IEnumSTATPROPSETSTG;
50 object,
51 uuid(00000138-0000-0000-C000-000000000046),
52 pointer_default(unique)
54 interface IPropertyStorage : IUnknown
56 typedef [unique] IPropertyStorage *LPPROPERTYSTORAGE;
58 const DWORD PROPSETFLAG_DEFAULT = 0;
59 const DWORD PROPSETFLAG_NONSIMPLE = 1;
60 const DWORD PROPSETFLAG_ANSI = 2;
61 const DWORD PROPSETFLAG_UNBUFFERED = 4;
62 const DWORD PROPSETFLAG_CASE_SENSITIVE = 8;
64 const DWORD PROPSET_BEHAVIOR_CASE_SENSITIVE = 1;
66 const PROPID PID_DICTIONARY = 0x00000000;
67 const PROPID PID_CODEPAGE = 0x00000001;
68 const PROPID PID_FIRST_USABLE = 0x00000002;
69 const PROPID PID_FIRST_NAME_DEFAULT = 0x00000fff;
70 const PROPID PID_LOCALE = 0x80000000;
71 const PROPID PID_MODIFY_TIME = 0x80000001;
72 const PROPID PID_SECURITY = 0x80000002;
73 const PROPID PID_BEHAVIOR = 0x80000003;
74 const PROPID PID_ILLEGAL = 0xffffffff;
75 const PROPID PID_MIN_READONLY = 0x80000000;
76 const PROPID PID_MAX_READONLY = 0xbfffffff;
78 typedef struct tagPROPVARIANT PROPVARIANT;
80 #define TYPEDEF_CA(type, name) \
81 typedef struct tag##name { \
82 ULONG cElems; \
83 [size_is(cElems)] \
84 type *pElems; \
85 } name
87 TYPEDEF_CA(unsigned char, CAUB);
88 TYPEDEF_CA(short, CAI);
89 TYPEDEF_CA(USHORT, CAUI);
90 TYPEDEF_CA(long, CAL);
91 TYPEDEF_CA(ULONG, CAUL);
92 TYPEDEF_CA(float, CAFLT);
93 TYPEDEF_CA(double, CADBL);
94 TYPEDEF_CA(CY, CACY);
95 TYPEDEF_CA(DATE, CADATE);
96 TYPEDEF_CA(BSTR, CABSTR);
97 TYPEDEF_CA(BSTRBLOB, CABSTRBLOB);
98 TYPEDEF_CA(VARIANT_BOOL, CABOOL);
99 TYPEDEF_CA(SCODE, CASCODE);
100 TYPEDEF_CA(PROPVARIANT, CAPROPVARIANT);
101 TYPEDEF_CA(LARGE_INTEGER, CAH);
102 TYPEDEF_CA(ULARGE_INTEGER, CAUH);
103 TYPEDEF_CA(LPSTR, CALPSTR);
104 TYPEDEF_CA(LPWSTR, CALPWSTR);
105 TYPEDEF_CA(FILETIME, CAFILETIME);
106 TYPEDEF_CA(CLIPDATA, CACLIPDATA);
107 TYPEDEF_CA(CLSID, CACLSID);
109 struct tagPROPVARIANT {
110 VARTYPE vt;
111 WORD wReserved1;
112 WORD wReserved2;
113 WORD wReserved3;
114 [switch_is(vt & 0x1fff)] union {
115 [case(VT_EMPTY, VT_NULL)] ;
116 [case(VT_I1)] char cVal;
117 [case(VT_UI1)] UCHAR bVal;
118 [case(VT_I2)] short iVal;
119 [case(VT_UI2)] USHORT uiVal;
120 [case(VT_BOOL)] VARIANT_BOOL boolVal;
121 #if 0 /* illegal in C++ */
122 [case(VT_ILLEGAL)] _VARIANT_BOOL bool;
123 #endif
124 [case(VT_I4)] long lVal;
125 [case(VT_UI4)] ULONG ulVal;
126 [case(VT_R4)] float fltVal;
127 [case(VT_ERROR)] SCODE scode;
128 [case(VT_I8)] LARGE_INTEGER hVal;
129 [case(VT_UI8)] ULARGE_INTEGER uhVal;
130 [case(VT_R8)] double dblVal;
131 [case(VT_CY)] CY cyVal;
132 [case(VT_DATE)] DATE date;
133 [case(VT_FILETIME)] FILETIME filetime;
134 [case(VT_CLSID)] CLSID *puuid;
135 [case(VT_BLOB, VT_BLOB_OBJECT)] BLOB blob;
136 [case(VT_CF)] CLIPDATA *pclipdata;
137 [case(VT_STREAM, VT_STREAMED_OBJECT)] IStream *pStream;
138 [case(VT_STORAGE, VT_STORED_OBJECT)] IStorage *pStorage;
139 [case(VT_BSTR)] BSTR bstrVal;
140 [case(VT_BSTR_BLOB)] BSTRBLOB bstrblobVal;
141 [case(VT_LPSTR)] LPSTR pszVal;
142 [case(VT_LPWSTR)] LPWSTR pwszVal;
143 [case(VT_UI1|VT_VECTOR)] CAUB caub;
144 [case(VT_I2|VT_VECTOR)] CAI cai;
145 [case(VT_UI2|VT_VECTOR)] CAUI caui;
146 [case(VT_BOOL|VT_VECTOR)] CABOOL cabool;
147 [case(VT_I4|VT_VECTOR)] CAL cal;
148 [case(VT_UI4|VT_VECTOR)] CAUL caul;
149 [case(VT_R4|VT_VECTOR)] CAFLT caflt;
150 [case(VT_ERROR|VT_VECTOR)] CASCODE cascode;
151 [case(VT_I8|VT_VECTOR)] CAH cah;
152 [case(VT_UI8|VT_VECTOR)] CAUH cauh;
153 [case(VT_R8|VT_VECTOR)] CADBL cadbl;
154 [case(VT_CY|VT_VECTOR)] CACY cacy;
155 [case(VT_DATE|VT_VECTOR)] CADATE cadate;
156 [case(VT_FILETIME|VT_VECTOR)] CAFILETIME cafiletime;
157 [case(VT_CLSID|VT_VECTOR)] CACLSID cauuid;
158 [case(VT_CF|VT_VECTOR)] CACLIPDATA caclipdata;
159 [case(VT_BSTR|VT_VECTOR)] CABSTR cabstr;
160 [case(VT_BSTR_BLOB|VT_VECTOR)] CABSTRBLOB cabstrblob;
161 [case(VT_LPSTR|VT_VECTOR)] CALPSTR calpstr;
162 [case(VT_LPWSTR|VT_VECTOR)] CALPWSTR calpwstr;
163 [case(VT_VARIANT|VT_VECTOR)] CAPROPVARIANT capropvar;
167 typedef struct tagPROPVARIANT *LPPROPVARIANT;
169 cpp_quote("#define PIDDI_THUMBNAIL 0x00000002L /* VT_BLOB */")
170 cpp_quote("")
171 cpp_quote("#define PIDSI_TITLE 0x00000002L /* VT_LPSTR */")
172 cpp_quote("#define PIDSI_SUBJECT 0x00000003L /* VT_LPSTR */")
173 cpp_quote("#define PIDSI_AUTHOR 0x00000004L /* VT_LPSTR */")
174 cpp_quote("#define PIDSI_KEYWORDS 0x00000005L /* VT_LPSTR */")
175 cpp_quote("#define PIDSI_COMMENTS 0x00000006L /* VT_LPSTR */")
176 cpp_quote("#define PIDSI_TEMPLATE 0x00000007L /* VT_LPSTR */")
177 cpp_quote("#define PIDSI_LASTAUTHOR 0x00000008L /* VT_LPSTR */")
178 cpp_quote("#define PIDSI_REVNUMBER 0x00000009L /* VT_LPSTR */")
179 cpp_quote("#define PIDSI_EDITTIME 0x0000000AL /* VT_FILETIME (UTC) */")
180 cpp_quote("#define PIDSI_LASTPRINTED 0x0000000BL /* VT_FILETIME (UTC) */")
181 cpp_quote("#define PIDSI_CREATE_DTM 0x0000000CL /* VT_FILETIME (UTC) */")
182 cpp_quote("#define PIDSI_LASTSAVE_DTM 0x0000000DL /* VT_FILETIME (UTC) */")
183 cpp_quote("#define PIDSI_PAGECOUNT 0x0000000EL /* VT_I4 */")
184 cpp_quote("#define PIDSI_WORDCOUNT 0x0000000FL /* VT_I4 */")
185 cpp_quote("#define PIDSI_CHARCOUNT 0x00000010L /* VT_I4 */")
186 cpp_quote("#define PIDSI_THUMBNAIL 0x00000011L /* VT_CF */")
187 cpp_quote("#define PIDSI_APPNAME 0x00000012L /* VT_LPSTR */")
188 cpp_quote("#define PIDSI_DOC_SECURITY 0x00000013L /* VT_I4 */")
189 cpp_quote("")
190 cpp_quote("#define PIDDSI_CATEGORY 0x00000002L /* VT_LPSTR */")
191 cpp_quote("#define PIDDSI_PRESFORMAT 0x00000003L /* VT_LPSTR */")
192 cpp_quote("#define PIDDSI_BYTECOUNT 0x00000004L /* VT_I4 */")
193 cpp_quote("#define PIDDSI_LINECOUNT 0x00000005L /* VT_I4 */")
194 cpp_quote("#define PIDDSI_PARCOUNT 0x00000006L /* VT_I4 */")
195 cpp_quote("#define PIDDSI_SLIDECOUNT 0x00000007L /* VT_I4 */")
196 cpp_quote("#define PIDDSI_NOTECOUNT 0x00000008L /* VT_I4 */")
197 cpp_quote("#define PIDDSI_HIDDENCOUNT 0x00000009L /* VT_I4 */")
198 cpp_quote("#define PIDDSI_MMCLIPCOUNT 0x0000000AL /* VT_I4 */")
199 cpp_quote("#define PIDDSI_SCALE 0x0000000BL /* VT_BOOL */")
200 cpp_quote("#define PIDDSI_HEADINGPAIR 0x0000000CL /* VT_VARIANT|VT_VECTOR */")
201 cpp_quote("#define PIDDSI_DOCPARTS 0x0000000DL /* VT_LPSTR|VT_VECTOR */")
202 cpp_quote("#define PIDDSI_MANAGER 0x0000000EL /* VT_LPSTR */")
203 cpp_quote("#define PIDDSI_COMPANY 0x0000000FL /* VT_LPSTR */")
204 cpp_quote("#define PIDDSI_LINKSDIRTY 0x00000010L /* VT_B0OL */")
206 const ULONG PRSPEC_INVALID = 0xffffffff;
207 const ULONG PRSPEC_LPWSTR = 0;
208 const ULONG PRSPEC_PROPID = 1;
210 typedef struct tagPROPSPEC {
211 ULONG ulKind;
212 [switch_is(ulKind)] union {
213 [case(PRSPEC_PROPID)] PROPID propid;
214 [case(PRSPEC_LPWSTR)] LPOLESTR lpwstr;
215 [default] ;
217 } PROPSPEC;
219 typedef struct tagSTATPROPSTG {
220 LPOLESTR lpwstrName;
221 PROPID propid;
222 VARTYPE vt;
223 } STATPROPSTG;
225 cpp_quote("/* Macros for dwOSVersion member of STATPROPSETSTG */")
226 cpp_quote("#define PROPSETHDR_OSVER_KIND(dwOSVer) HIWORD((dwOSVer))")
227 cpp_quote("#define PROPSETHDR_OSVER_MAJOR(dwOSVer) LOBYTE(LOWORD((dwOSVer)))")
228 cpp_quote("#define PROPSETHDR_OSVER_MINOR(dwOSVer) HIBYTE(LOWORD((dwOSVer)))")
229 cpp_quote("#define PROPSETHDR_OSVERSION_UNKNOWN 0xffffffff")
231 typedef struct tagSTATPROPSETSTG {
232 FMTID fmtid;
233 CLSID clsid;
234 DWORD grfFlags;
235 FILETIME mtime;
236 FILETIME ctime;
237 FILETIME atime;
238 DWORD dwOSVersion;
239 } STATPROPSETSTG;
241 HRESULT ReadMultiple(
242 [in] ULONG cpspec,
243 [in, size_is(cpspec)] const PROPSPEC rgpspec[],
244 [out, size_is(cpspec)] PROPVARIANT rgpropvar[]);
246 HRESULT WriteMultiple(
247 [in] ULONG cpspec,
248 [in, size_is(cpspec)] const PROPSPEC rgpspec[],
249 [in, size_is(cpspec)] const PROPVARIANT rgpropvar[],
250 [in] PROPID propidNameFirst);
252 HRESULT DeleteMultiple(
253 [in] ULONG cpspec,
254 [in, size_is(cpspec)] const PROPSPEC rgpspec[]);
256 HRESULT ReadPropertyNames(
257 [in] ULONG cpropid,
258 [in, size_is(cpropid)] const PROPID rgpropid[],
259 [out, size_is(cpropid)] LPOLESTR rglpwstrName[]);
261 HRESULT WritePropertyNames(
262 [in] ULONG cpropid,
263 [in, size_is(cpropid)] const PROPID rgpropid[],
264 [in, size_is(cpropid)] const LPOLESTR rglpwstrName[]);
266 HRESULT DeletePropertyNames(
267 [in] ULONG cpropid,
268 [in, size_is(cpropid)] const PROPID rgpropid[]);
270 HRESULT Commit(
271 [in] DWORD grfCommitFlags);
273 HRESULT Revert();
275 HRESULT Enum(
276 [out] IEnumSTATPROPSTG **ppenum);
278 HRESULT SetTimes(
279 [in] const FILETIME *pctime,
280 [in] const FILETIME *patime,
281 [in] const FILETIME *pmtime);
283 HRESULT SetClass(
284 [in] REFCLSID clsid);
286 HRESULT Stat(
287 [out] STATPROPSETSTG *statpsstg);
291 object,
292 uuid(0000013A-0000-0000-C000-000000000046),
293 pointer_default(unique)
295 interface IPropertySetStorage : IUnknown
297 typedef [unique] IPropertySetStorage *LPPROPERTYSETSTORAGE;
299 HRESULT Create(
300 [in] REFFMTID rfmtid,
301 [in, unique] const CLSID *pclsid,
302 [in] DWORD grfFlags,
303 [in] DWORD grfMode,
304 [out] IPropertyStorage **ppprstg);
306 HRESULT Open(
307 [in] REFFMTID rfmtid,
308 [in] DWORD grfMode,
309 [out] IPropertyStorage **ppprstg);
311 HRESULT Delete(
312 [in] REFFMTID rfmtid);
314 HRESULT Enum(
315 [out] IEnumSTATPROPSETSTG **ppenum);
319 object,
320 uuid(00000139-0000-0000-C000-000000000046),
321 pointer_default(unique)
323 interface IEnumSTATPROPSTG : IUnknown
325 typedef [unique] IEnumSTATPROPSTG *LPENUMSTATPROPSTG;
327 [local]
328 HRESULT Next(
329 [in] ULONG celt,
330 [out, size_is(celt), length_is(*pceltFetched)]
331 STATPROPSTG *rgelt,
332 [out] ULONG *pceltFetched);
334 [call_as(Next)]
335 HRESULT RemoteNext(
336 [in] ULONG celt,
337 [out, size_is(celt), length_is(*pceltFetched)]
338 STATPROPSTG *rgelt,
339 [out] ULONG *pceltFetched);
341 HRESULT Skip(
342 [in] ULONG celt);
344 HRESULT Reset();
346 HRESULT Clone(
347 [out] IEnumSTATPROPSTG **ppenum);
351 object,
352 uuid(0000013B-0000-0000-C000-000000000046),
353 pointer_default(unique)
355 interface IEnumSTATPROPSETSTG : IUnknown
357 typedef [unique] IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
359 [local]
360 HRESULT Next(
361 [in] ULONG celt,
362 [out, size_is(celt), length_is(*pceltFetched)]
363 STATPROPSETSTG *rgelt,
364 [out] ULONG *pceltFetched);
366 [call_as(Next)]
367 HRESULT RemoteNext(
368 [in] ULONG celt,
369 [out, size_is(celt), length_is(*pceltFetched)]
370 STATPROPSETSTG *rgelt,
371 [out] ULONG *pceltFetched);
373 HRESULT Skip(
374 [in] ULONG celt);
376 HRESULT Reset();
378 HRESULT Clone(
379 [out] IEnumSTATPROPSETSTG **ppenum);
383 cpp_quote("HRESULT WINAPI FreePropVariantArray(ULONG,PROPVARIANT*);");
384 cpp_quote("HRESULT WINAPI PropVariantClear(PROPVARIANT*);");
385 cpp_quote("HRESULT WINAPI PropVariantCopy(PROPVARIANT*,const PROPVARIANT*);");
386 cpp_quote("")
387 cpp_quote("#define _PROPVARIANT_INIT_DEFINED_")
388 cpp_quote("#define PropVariantInit(p) memset((p), 0, sizeof(PROPVARIANT))")