2 * Defines the COM interfaces and APIs related to saving properties to file.
5 #ifndef __WINE_WINE_OBJ_PROPERTYSTORAGE_H
6 #define __WINE_WINE_OBJ_PROPERTYSTORAGE_H
8 #include "wine/obj_base.h"
9 #include "wine/obj_storage.h"
13 #endif /* defined(__cplusplus) */
15 /*****************************************************************************
16 * Predeclare the interfaces
18 DEFINE_OLEGUID(IID_IEnumSTATPROPSETSTG
, 0x0000013bL
, 0, 0);
19 typedef struct IEnumSTATPROPSETSTG IEnumSTATPROPSETSTG
,*LPENUMSTATPROPSETSTG
;
21 DEFINE_OLEGUID(IID_IEnumSTATPROPSTG
, 0x00000139L
, 0, 0);
22 typedef struct IEnumSTATPROPSTG IEnumSTATPROPSTG
,*LPENUMSTATPROPSTG
;
24 DEFINE_OLEGUID(IID_IPropertySetStorage
, 0x0000013aL
, 0, 0);
25 typedef struct IPropertySetStorage IPropertySetStorage
,*LPPROPERTYSETSTORAGE
;
27 DEFINE_OLEGUID(IID_IPropertyStorage
, 0x00000138L
, 0, 0);
28 typedef struct IPropertyStorage IPropertyStorage
,*LPPROPERTYSTORAGE
;
31 /*****************************************************************************
32 * Predeclare the structures
35 typedef struct tagSTATPROPSETSTG STATPROPSETSTG
;
36 typedef struct tagSTATPROPSTG STATPROPSTG
;
38 extern const FMTID FMTID_SummaryInformation
;
39 extern const FMTID FMTID_DocSummaryInformation
;
40 extern const FMTID FMTID_UserDefinedProperties
;
42 /*****************************************************************************
46 /* Reserved global Property IDs */
47 #define PID_DICTIONARY ( 0 )
49 #define PID_CODEPAGE ( 0x1 )
51 #define PID_FIRST_USABLE ( 0x2 )
53 #define PID_FIRST_NAME_DEFAULT ( 0xfff )
55 #define PID_LOCALE ( 0x80000000 )
57 #define PID_MODIFY_TIME ( 0x80000001 )
59 #define PID_SECURITY ( 0x80000002 )
61 #define PID_ILLEGAL ( 0xffffffff )
63 /* Property IDs for the SummaryInformation Property Set */
65 #define PIDSI_TITLE 0x00000002L /* VT_LPSTR */
66 #define PIDSI_SUBJECT 0x00000003L /* VT_LPSTR */
67 #define PIDSI_AUTHOR 0x00000004L /* VT_LPSTR */
68 #define PIDSI_KEYWORDS 0x00000005L /* VT_LPSTR */
69 #define PIDSI_COMMENTS 0x00000006L /* VT_LPSTR */
70 #define PIDSI_TEMPLATE 0x00000007L /* VT_LPSTR */
71 #define PIDSI_LASTAUTHOR 0x00000008L /* VT_LPSTR */
72 #define PIDSI_REVNUMBER 0x00000009L /* VT_LPSTR */
73 #define PIDSI_EDITTIME 0x0000000aL /* VT_FILETIME (UTC) */
74 #define PIDSI_LASTPRINTED 0x0000000bL /* VT_FILETIME (UTC) */
75 #define PIDSI_CREATE_DTM 0x0000000cL /* VT_FILETIME (UTC) */
76 #define PIDSI_LASTSAVE_DTM 0x0000000dL /* VT_FILETIME (UTC) */
77 #define PIDSI_PAGECOUNT 0x0000000eL /* VT_I4 */
78 #define PIDSI_WORDCOUNT 0x0000000fL /* VT_I4 */
79 #define PIDSI_CHARCOUNT 0x00000010L /* VT_I4 */
80 #define PIDSI_THUMBNAIL 0x00000011L /* VT_CF */
81 #define PIDSI_APPNAME 0x00000012L /* VT_LPSTR */
82 #define PIDSI_DOC_SECURITY 0x00000013L /* VT_I4 */
83 #define PRSPEC_INVALID ( 0xffffffff )
86 #define PRSPEC_LPWSTR ( 0 )
87 #define PRSPEC_PROPID ( 1 )
89 typedef struct tagPROPSPEC
100 /*****************************************************************************
101 * STATPROPSETSTG structure
103 /* Macros for parsing the OS Version of the Property Set Header */
104 #define PROPSETHDR_OSVER_KIND(dwOSVer) HIWORD( (dwOSVer) )
105 #define PROPSETHDR_OSVER_MAJOR(dwOSVer) LOBYTE(LOWORD( (dwOSVer) ))
106 #define PROPSETHDR_OSVER_MINOR(dwOSVer) HIBYTE(LOWORD( (dwOSVer) ))
107 #define PROPSETHDR_OSVERSION_UNKNOWN 0xFFFFFFFF
109 struct tagSTATPROPSETSTG
121 /*****************************************************************************
122 * STATPROPSTG structure
124 struct tagSTATPROPSTG
132 /*****************************************************************************
133 * IEnumSTATPROPSETSTG interface
135 #define ICOM_INTERFACE IEnumSTATPROPSETSTG
136 #define IEnumSTATPROPSETSTG_METHODS \
137 ICOM_METHOD3(HRESULT,Next, ULONG,celt, STATPROPSETSTG*,rgelt, ULONG*,pceltFethed) \
138 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
139 ICOM_METHOD (HRESULT,Reset) \
140 ICOM_METHOD1(HRESULT,Clone, IEnumSTATPROPSETSTG**,ppenum)
141 #define IEnumSTATPROPSETSTG_IMETHODS \
143 IEnumSTATPROPSETSTG_METHODS
144 ICOM_DEFINE(IEnumSTATPROPSETSTG
,IUnknown
)
145 #undef ICOM_INTERFACE
147 /*** IUnknown methods ***/
148 #define IEnumSTATPROPSETSTG_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
149 #define IEnumSTATPROPSETSTG_AddRef(p) ICOM_CALL (AddRef,p)
150 #define IEnumSTATPROPSETSTG_Release(p) ICOM_CALL (Release,p)
151 /*** IEnumSTATPROPSETSTG methods ***/
152 #define IEnumSTATPROPSETSTG_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
153 #define IEnumSTATPROPSETSTG_Skip(p,a) ICOM_CALL1(Skip,p,a)
154 #define IEnumSTATPROPSETSTG_Reset(p) ICOM_CALL (Reset,p)
155 #define IEnumSTATPROPSETSTG_Clone(p,a) ICOM_CALL1(Clone,p,a)
158 /*****************************************************************************
159 * IEnumSTATPROPSTG interface
161 #define ICOM_INTERFACE IEnumSTATPROPSTG
162 #define IEnumSTATPROPSTG_METHODS \
163 ICOM_METHOD3(HRESULT,Next, ULONG,celt, STATPROPSTG*,rgelt, ULONG*,pceltFethed) \
164 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
165 ICOM_METHOD (HRESULT,Reset) \
166 ICOM_METHOD1(HRESULT,Clone, IEnumSTATPROPSTG**,ppenum)
167 #define IEnumSTATPROPSTG_IMETHODS \
169 IEnumSTATPROPSTG_METHODS
170 ICOM_DEFINE(IEnumSTATPROPSTG
,IUnknown
)
171 #undef ICOM_INTERFACE
173 /*** IUnknown methods ***/
174 #define IEnumSTATPROPSTG_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
175 #define IEnumSTATPROPSTG_AddRef(p) ICOM_CALL (AddRef,p)
176 #define IEnumSTATPROPSTG_Release(p) ICOM_CALL (Release,p)
177 /*** IEnumSTATPROPSTG methods ***/
178 #define IEnumSTATPROPSTG_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
179 #define IEnumSTATPROPSTG_Skip(p,a) ICOM_CALL1(Skip,p,a)
180 #define IEnumSTATPROPSTG_Reset(p) ICOM_CALL (Reset,p)
181 #define IEnumSTATPROPSTG_Clone(p,a) ICOM_CALL1(Clone,p,a)
184 /*****************************************************************************
185 * IPropertySetStorage interface
187 #define ICOM_INTERFACE IPropertySetStorage
188 #define IPropertySetStorage_METHODS \
189 ICOM_METHOD5(HRESULT,Create, REFFMTID,rfmtid, const CLSID*,pclsid, DWORD,grfFlags, DWORD,grfMode, IPropertyStorage**,ppprstg) \
190 ICOM_METHOD3(HRESULT,Open, REFFMTID,rfmtid, DWORD,grfMode, IPropertyStorage**,ppprstg) \
191 ICOM_METHOD1(HRESULT,Delete, REFFMTID,rfmtid) \
192 ICOM_METHOD1(HRESULT,Enum, IEnumSTATPROPSETSTG**,ppenum)
193 #define IPropertySetStorage_IMETHODS \
195 IPropertySetStorage_METHODS
196 ICOM_DEFINE(IPropertySetStorage
,IUnknown
)
197 #undef ICOM_INTERFACE
199 /*** IUnknown methods ***/
200 #define IPropertySetStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
201 #define IPropertySetStorage_AddRef(p) ICOM_CALL (AddRef,p)
202 #define IPropertySetStorage_Release(p) ICOM_CALL (Release,p)
203 /*** IPropertySetStorage methods ***/
204 #define IPropertySetStorage_Create(p,a,b,c,d,e) ICOM_CALL5(Create,p,a,b,c,d,e)
205 #define IPropertySetStorage_Open(p,a,b,c) ICOM_CALL3(Open,p,a,b,c)
206 #define IPropertySetStorage_Delete(p,a) ICOM_CALL1(Delete,p,a)
207 #define IPropertySetStorage_Enum(p,a) ICOM_CALL1(Enum,p,a)
210 /*****************************************************************************
211 * IPropertyStorage interface
213 typedef struct tagPROPVARIANT PROPVARIANT
,*LPPROPVARIANT
;
215 /* Flags for IPropertySetStorage::Create */
216 #define PROPSETFLAG_DEFAULT ( 0 )
217 #define PROPSETFLAG_NONSIMPLE ( 1 )
218 #define PROPSETFLAG_ANSI ( 2 )
220 typedef struct tagCAUB
223 unsigned char *pElems
;
226 typedef struct tagCAI
232 typedef struct tagCAUI
238 typedef struct tagCAL
244 typedef struct tagCAUL
250 typedef struct tagCAFLT
256 typedef struct tagCADBL
262 typedef struct tagCACY
268 typedef struct tagCADATE
274 typedef struct tagCABSTR
280 typedef struct tagCABOOL
283 VARIANT_BOOL
*pElems
;
286 typedef struct tagCASCODE
292 typedef struct tagCAPROPVARIANT
298 typedef struct tagCAH
301 LARGE_INTEGER
*pElems
;
304 typedef struct tagCAUH
307 ULARGE_INTEGER
*pElems
;
310 typedef struct tagCALPSTR
316 typedef struct tagCALPWSTR
322 typedef struct tagCAFILETIME
328 typedef struct tagCACLIPDATA
334 typedef struct tagCACLSID
340 struct tagPROPVARIANT
348 /* Empty union arm */
352 VARIANT_BOOL boolVal
;
354 /* FIXME: bool is reserved in C++, how can we deal with that ? */
362 ULARGE_INTEGER uhVal
;
388 CAFILETIME cafiletime
;
390 CACLIPDATA caclipdata
;
394 CAPROPVARIANT capropvar
;
399 #define ICOM_INTERFACE IPropertyStorage
400 #define IPropertyStorage_METHODS \
401 ICOM_METHOD3(HRESULT,ReadMultiple, ULONG,cpspec, const PROPSPEC*,rgpspec, PROPVARIANT*,rgpropvar) \
402 ICOM_METHOD4(HRESULT,WriteMultiple, ULONG,cpspec, const PROPSPEC*,rgpspec, const PROPVARIANT*,rgpropvar, PROPID,propidNameFirst) \
403 ICOM_METHOD2(HRESULT,DeleteMultiple, ULONG,cpspec, const PROPSPEC*,rgpspec) \
404 ICOM_METHOD2(HRESULT,ReadPropertyNames, const PROPID*,rgpropid, LPOLESTR*,rglpwstrName) \
405 ICOM_METHOD3(HRESULT,WritePropertyNames, ULONG,cpropid, const PROPID*,rgpropid, LPOLESTR*,rglpwstrName) \
406 ICOM_METHOD2(HRESULT,DeletePropertyNames, ULONG,cpropid, const PROPID*,rgpropid) \
407 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
408 ICOM_METHOD (HRESULT,Revert) \
409 ICOM_METHOD1(HRESULT,Enum, IEnumSTATPROPSTG**,ppenum) \
410 ICOM_METHOD3(HRESULT,SetTimes, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime) \
411 ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid) \
412 ICOM_METHOD1(HRESULT,Stat, STATPROPSETSTG*,pstatpsstg)
413 #define IPropertyStorage_IMETHODS \
415 IPropertyStorage_METHODS
416 ICOM_DEFINE(IPropertyStorage
,IUnknown
)
417 #undef ICOM_INTERFACE
419 /*** IUnknown methods ***/
420 #define IPropertyStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
421 #define IPropertyStorage_AddRef(p) ICOM_CALL (AddRef,p)
422 #define IPropertyStorage_Release(p) ICOM_CALL (Release,p)
423 /*** IPropertyStorage methods ***/
424 #define IPropertyStorage_ReadMultiple(p,a,b,c) ICOM_CALL3(ReadMultiple,p,a,b,c)
425 #define IPropertyStorage_WriteMultiple(p,a,b,c,d) ICOM_CALL4(WriteMultiple,p,a,b,c,d)
426 #define IPropertyStorage_DeleteMultiple(p,a,b) ICOM_CALL2(DeleteMultiple,p,a,b)
427 #define IPropertyStorage_ReadPropertyNames(p,a,b) ICOM_CALL2(ReadPropertyNames,p,a,b)
428 #define IPropertyStorage_WritePropertyNames(p,a,b,c) ICOM_CALL3(WritePropertyNames,p,a,b,c)
429 #define IPropertyStorage_DeletePropertyNames(p,a,b) ICOM_CALL2(DeletePropertyNames,p,a,b)
430 #define IPropertyStorage_Commit(p,a) ICOM_CALL1(Commit,p,a)
431 #define IPropertyStorage_Revert(p) ICOM_CALL (Revert,p)
432 #define IPropertyStorage_Enum(p,a) ICOM_CALL1(Enum,p,a)
433 #define IPropertyStorage_SetTimes(p,a,b,c) ICOM_CALL3(SetTimes,p,a,b,c)
434 #define IPropertyStorage_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
435 #define IPropertyStorage_Stat(p,a) ICOM_CALL1(Stat,p,a)
439 #endif /* defined(__cplusplus) */
441 #endif /* __WINE_WINE_OBJ_PROPERTYSTORAGE_H */