2 * system property interfaces
4 * Copyright 2009 Maarten Lankhorst
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 import
"structuredquerycondition.idl";
29 cpp_quote
("#ifndef PSSTDAPI")
30 cpp_quote
("#define PSSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE")
34 typedef PROPERTYKEY
*REFPROPERTYKEY
;
36 cpp_quote
("#include <propkeydef.h>")
39 uuid(b7d14566
-0509-4cce
-a71f
-0a554233bd9b
),
41 pointer_default(unique)
43 interface IInitializeWithFile
: IUnknown
46 [in,string] LPCWSTR pszFilePath
,
52 uuid(b824b49d
-22ac
-4161-ac8a
-9916e8fa3f7f
),
54 pointer_default(unique)
56 interface IInitializeWithStream
: IUnknown
58 [local] HRESULT Initialize
(
59 [in] IStream
*pstream
,
65 uuid(886d8eeb
-8cf2
-4446-8d02
-cdba1dbdcf99
),
67 pointer_default(unique)
69 interface IPropertyStore
: IUnknown
76 [out] PROPERTYKEY
*pkey
79 [in] REFPROPERTYKEY key
,
83 [in] REFPROPERTYKEY key
,
84 [in] REFPROPVARIANT propvar
89 typedef IPropertyStore
*LPPROPERTYSTORE
;
92 uuid(71604b0f
-97b0
-4764-8577-2f13e98a1422
),
94 pointer_default(unique)
96 interface INamedPropertyStore
: IUnknown
98 HRESULT GetNamedValue
(
99 [in,string] LPCWSTR pszName
,
100 [out] PROPVARIANT
*ppropvar
102 HRESULT SetNamedValue
(
103 [in,string] LPCWSTR pszName
,
104 [in] REFPROPVARIANT propvar
106 HRESULT GetNameCount
(
107 [out] DWORD
*pdwCount
111 [out] BSTR *pbstrName
115 typedef [v1_enum] enum GETPROPERTYSTOREFLAGS
118 GPS_HANDLERPROPERTIESONLY
= 0x01,
119 GPS_READWRITE
= 0x02,
120 GPS_TEMPORARY
= 0x04,
121 GPS_FASTPROPERTIESONLY
= 0x08,
122 GPS_OPENSLOWITEM
= 0x10,
123 GPS_DELAYCREATION
= 0x20,
124 GPS_BESTEFFORT
= 0x40,
125 GPS_NO_OPLOCK
= 0x80,
126 GPS_MASK_VALID
= 0xff
127 } GETPROPERTYSTOREFLAGS
;
129 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(GETPROPERTYSTOREFLAGS)")
132 uuid(fc0ca0a7
-c316
-4fd2
-9031-3e628e6d4f23
),
135 interface IObjectWithPropertyKey
: IUnknown
137 HRESULT SetPropertyKey
(
138 [in] REFPROPERTYKEY key
140 HRESULT GetPropertyKey
(
141 [out] PROPERTYKEY
*key
145 typedef [v1_enum] enum PKA_FLAGS
153 uuid(f917bc8a
-1bba
-4478-a245
-1bde03eb9431
),
155 pointer_default(unique)
157 interface IPropertyChange
: IObjectWithPropertyKey
159 HRESULT ApplyToPropVariant
([in] REFPROPVARIANT propvarin
, [out] PROPVARIANT
*propvarout
);
163 uuid(380f5cad
-1b5e
-42f2
-805d
-637fd392d31e
),
165 pointer_default(unique)
167 interface IPropertyChangeArray
: IUnknown
170 [out] UINT
*pcOperations
175 [out, iid_is(riid
)] void **ppv
179 [in] IPropertyChange
*ppropChange
182 [in] IPropertyChange
*ppropChange
184 HRESULT AppendOrReplace
(
185 [in] IPropertyChange
*ppropChange
190 HRESULT IsKeyInArray
(
191 [in] REFPROPERTYKEY key
196 uuid(c8e2d566
-186e-4d49
-bf41
-6909ead56acc
),
198 pointer_default(unique)
200 interface IPropertyStoreCapabilities
: IUnknown
202 HRESULT IsPropertyWritable
(
203 [in] REFPROPERTYKEY key
208 uuid(3017056d
-9a91
-4e90
-937d
-746c72abbf4f
),
210 pointer_default(unique)
212 interface IPropertyStoreCache
: IPropertyStore
214 typedef [v1_enum] enum PSC_STATE
223 [in] REFPROPERTYKEY key
,
224 [out] PSC_STATE
*pstate
226 HRESULT GetValueAndState
(
227 [in] REFPROPERTYKEY key
,
228 [out] PROPVARIANT
*ppropvar
,
229 [out] PSC_STATE
*pstate
232 [in] REFPROPERTYKEY key
,
233 [in] PSC_STATE pstate
235 HRESULT SetValueAndState
(
236 [in] REFPROPERTYKEY key
,
237 [in, unique] const PROPVARIANT
*ppropvar
,
243 uuid(11e1fbf9
-2d56
-4a6b
-8db3
-7cd193a471f2
),
245 pointer_default(unique)
247 interface IPropertyEnumType
: IUnknown
249 typedef [v1_enum] enum PROPENUMTYPE
251 PET_DISCRETEVALUE
= 0,
258 [out] PROPENUMTYPE
*penumtype
261 [out] PROPVARIANT
*ppropvar
263 HRESULT GetRangeMinValue
(
264 [out] PROPVARIANT
*ppropvar
266 HRESULT GetRangeSetValue
(
267 [out] PROPVARIANT
*ppropvar
269 HRESULT GetDisplayText
(
270 [out] LPWSTR
*ppszDisplay
275 uuid(9b6e051c
-5ddd
-4321-9070-fe2acb55e974
),
277 pointer_default(unique)
279 interface IPropertyEnumType2
: IPropertyEnumType
281 HRESULT GetImageReference
(
282 [out] LPWSTR
*ppszImageRes
287 uuid(a99400f4
-3d84
-4557-94ba
-1242fb2cc9a6
),
289 pointer_default(unique)
291 interface IPropertyEnumTypeList
: IUnknown
299 [out, iid_is(riid
)] void **ppv
301 HRESULT GetConditionAt
(
304 [out, iid_is(riid
)] void **ppv
306 HRESULT FindMatchingIndex
(
307 [in] REFPROPVARIANT propvarCmp
,
313 uuid(6f79d558
-3e96
-4549-a1d1
-7d75d2288814
),
315 pointer_default(unique)
317 interface IPropertyDescription
: IUnknown
319 typedef [v1_enum] enum PROPDESC_TYPE_FLAGS
322 PDTF_MULTIPLEVALUES
= 0x001,
323 PDTF_ISINNATE
= 0x002,
324 PDTF_ISGROUP
= 0x004,
325 PDTF_CANGROUPBY
= 0x008,
326 PDTF_CANSTACKBY
= 0x010,
327 PDTF_ISTREEPROPERTY
= 0x020,
328 PDTF_INCLUDEINFULLTEXTQUERY
= 0x040,
329 PDTF_ISVIEWABLE
= 0x080,
330 PDTF_ISQUERYABLE
= 0x100,
331 PDTF_CANBEPURGED
= 0x200,
332 PDTF_SEARCHRAWVALUE
= 0x400,
333 PDTF_ISSYSTEMPROPERTY
= 0x80000000,
334 PDTF_MASK_ALL
= 0x800007ff
335 } PROPDESC_TYPE_FLAGS
;
336 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_TYPE_FLAGS)")
338 typedef [v1_enum] enum PROPDESC_VIEW_FLAGS
340 PDVF_DEFAULT
= 0x0000,
341 PDVF_CENTERALIGN
= 0x0001,
342 PDVF_RIGHTALIGN
= 0x0002,
343 PDVF_BEGINNEWGROUP
= 0x0004,
344 PDVF_FILLAREA
= 0x0008,
345 PDVF_SORTDESCENDING
= 0x0010,
346 PDVF_SHOWONLYIFPRESENT
= 0x0020,
347 PDVF_SHOWBYDEFAULT
= 0x0040,
348 PDVF_SHOWINPRIMARYLIST
= 0x0080,
349 PDVF_SHOWINSECONDARYLIST
= 0x0100,
350 PDVF_HIDELABEL
= 0x0200,
351 PDVF_HIDDEN
= 0x0800,
352 PDVF_CANWRAP
= 0x1000,
353 PDVF_MASK_ALL
= 0x1bff
354 } PROPDESC_VIEW_FLAGS
;
355 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_VIEW_FLAGS)")
357 typedef [v1_enum] enum PROPDESC_DISPLAYTYPE
364 } PROPDESC_DISPLAYTYPE
;
366 typedef [v1_enum] enum PROPDESC_GROUPING_RANGE
375 } PROPDESC_GROUPING_RANGE
;
377 typedef [v1_enum] enum PROPDESC_FORMAT_FLAGS
379 PDFF_DEFAULT
= 0x0000,
380 PDFF_PREFIXNAME
= 0x0001,
381 PDFF_FILENAME
= 0x0002,
382 PDFF_ALWAYSKB
= 0x0004,
383 PDFF_RESERVED_RIGHTTOLEFT
= 0x0008,
384 PDFF_SHORTTIME
= 0x0010,
385 PDFF_LONGTIME
= 0x0020,
386 PDFF_HIDETIME
= 0x0040,
387 PDFF_SHORTDATE
= 0x0080,
388 PDFF_LONGDATE
= 0x0100,
389 PDFF_HIDEDATE
= 0x0200,
390 PDFF_RELATIVEDATE
= 0x0400,
391 PDFF_USEEDITINVITATION
= 0x0800,
392 PDFF_READONLY
= 0x1000,
393 PDFF_NOAUTOREADINGORDER
= 0x2000
394 } PROPDESC_FORMAT_FLAGS
;
395 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_FORMAT_FLAGS)")
397 typedef [v1_enum] enum PROPDESC_SORTDESCRIPTION
402 PDSD_SMALLEST_BIGGEST
,
404 } PROPDESC_SORTDESCRIPTION
;
406 typedef [v1_enum] enum PROPDESC_RELATIVEDESCRIPTION_TYPE
419 } PROPDESC_RELATIVEDESCRIPTION_TYPE
;
421 typedef [v1_enum] enum PROPDESC_AGGREGATION_TYPE
431 } PROPDESC_AGGREGATION_TYPE
;
433 typedef [v1_enum] enum PROPDESC_CONDITION_TYPE
441 } PROPDESC_CONDITION_TYPE
;
443 HRESULT GetPropertyKey
(
444 [out] PROPERTYKEY
*pkey
446 HRESULT GetCanonicalName
(
447 [out, string] LPWSTR
*ppszName
449 HRESULT GetPropertyType
(
450 [out] VARTYPE
*pvartype
452 HRESULT GetDisplayName
(
453 [out, string] LPWSTR
*ppszName
455 HRESULT GetEditInvitation
(
456 [out, string] LPWSTR
*ppszName
458 HRESULT GetTypeFlags
(
459 [in] PROPDESC_TYPE_FLAGS mask
,
460 [out] PROPDESC_TYPE_FLAGS
*ppdtFlags
462 HRESULT GetViewFlags
(
463 [out] PROPDESC_VIEW_FLAGS
*ppdvFlags
465 HRESULT GetDefaultColumnWidth
(
468 HRESULT GetDisplayType
(
469 [out] PROPDESC_DISPLAYTYPE
*pdisplaytype
471 HRESULT GetColumnState
(
472 [out] SHCOLSTATEF
*pcsFlags
474 HRESULT GetGroupingRange
(
475 [out] PROPDESC_GROUPING_RANGE
*psd
477 HRESULT GetRelativeDescriptionType
(
478 [out] PROPDESC_RELATIVEDESCRIPTION_TYPE
*prdt
480 HRESULT GetRelativeDescription
(
481 [in] REFPROPVARIANT propvar1
,
482 [in] REFPROPVARIANT propvar2
,
483 [out,string] LPWSTR
*ppszDesc1
,
484 [out,string] LPWSTR
*ppszDesc2
486 HRESULT GetSortDescription
(
487 [out] PROPDESC_SORTDESCRIPTION
*psd
489 HRESULT GetSortDescriptionLabel
(
490 [in] BOOL fDescending
,
491 [out,string] LPWSTR
*ppszDescription
493 HRESULT GetAggregationType
(
494 [out] PROPDESC_AGGREGATION_TYPE
*paggtype
496 HRESULT GetConditionType
(
497 [out] PROPDESC_CONDITION_TYPE
*pcontype
,
498 [out] CONDITION_OPERATION
*popDefault
500 HRESULT GetEnumTypeList
(
502 [out,iid_is(riid
)] void **ppv
504 [local] HRESULT CoerceToCanonicalValue
(
505 [in,out] PROPVARIANT
*propvar
507 [call_as
(CoerceToCanonicalValue
)] HRESULT RemoteCoerceToCanonicalValue
(
508 [in] REFPROPVARIANT propvar
,
509 [out] PROPVARIANT
*ppropvar
511 HRESULT FormatForDisplay
(
512 [in] REFPROPVARIANT propvar
,
513 [in] PROPDESC_FORMAT_FLAGS flags
,
514 [out,string] LPWSTR
*ppszDisplay
516 HRESULT IsValueCanonical
(
517 [in] REFPROPVARIANT propvar
522 uuid(57d2eded
-5062-400e
-b107
-5dae79fe57a6
),
524 pointer_default(unique)
526 interface IPropertyDescription2
: IPropertyDescription
528 HRESULT GetImageReferenceForValue
(
529 [in] REFPROPVARIANT propvar
,
530 [out,string] LPWSTR
*ppszImageRes
535 uuid(f67104fc
-2af9
-46fd
-b32d
-243c1404f3d1
),
537 pointer_default(unique)
539 interface IPropertyDescriptionAliasInfo
: IPropertyDescription
541 HRESULT GetSortByAlias
(
543 [out,iid_is(riid
)] void **ppv
545 HRESULT GetAdditionalSortByAliases
(
547 [out,iid_is(riid
)] void **ppv
552 uuid(078f91bd
-29a2
-440f
-924e-46a291524520
),
554 pointer_default(unique)
556 interface IPropertyDescriptionSearchInfo
: IPropertyDescription
558 typedef [v1_enum] enum PROPDESC_SEARCHINFO_FLAGS
561 PDSIF_ININVERTEDINDEX
= 0x1,
562 PDSIF_ISCOLUMN
= 0x2,
563 PDSIF_ISCOLUMNSPARSE
= 0x4,
564 PDSIF_ALWAYSINCLUDE
= 0x8,
565 } PROPDESC_SEARCHINFO_FLAGS
;
566 cpp_quote
("DEFINE_ENUM_FLAG_OPERATORS(PROPDESC_SEARCHINFO_FLAGS)")
568 typedef [v1_enum] enum PROPDESC_COLUMNINDEX_TYPE
576 } PROPDESC_COLUMNINDEX_TYPE
;
578 HRESULT GetSearchInfoFlags
(
579 [out] PROPDESC_SEARCHINFO_FLAGS
*ppdsiFlags
581 HRESULT GetColumnIndexType
(
582 [out] PROPDESC_COLUMNINDEX_TYPE
*ppdciType
584 HRESULT GetProjectionString
(
585 [out] LPWSTR
*ppszProjection
588 [out] UINT
*pcbMaxSize
593 uuid(507393f4
-2a3d
-4a60
-b59e
-d9c75716c2dd
),
595 pointer_default(unique)
597 interface IPropertyDescriptionRelatedPropertyInfo
: IPropertyDescription
599 HRESULT GetRelatedProperty
(
600 [in] LPCWSTR ppszRelationshipName
,
602 [out,iid_is(riid
)] void **ppv
606 typedef [v1_enum] enum PROPDESC_ENUMFILTER
613 PDEF_INFULLTEXTQUERY
,
615 } PROPDESC_ENUMFILTER
;
618 uuid(ca724e8a
-c3e6
-442b
-88a4
-6fb0db8035a3
),
620 pointer_default(unique)
622 interface IPropertySystem
: IUnknown
624 HRESULT GetPropertyDescription
(
625 [in] REFPROPERTYKEY propkey
,
627 [out,iid_is(riid
)] void **ppv
629 HRESULT GetPropertyDescriptionByName
(
630 [in,string] LPCWSTR pszCanonicalName
,
632 [out,iid_is(riid
)] void **ppv
634 HRESULT GetPropertyDescriptionListFromString
(
635 [in,string] LPCWSTR pszPropList
,
637 [out,iid_is(riid
)] void **ppv
639 HRESULT EnumeratePropertyDescriptions
(
640 [in] PROPDESC_ENUMFILTER filterOn
,
642 [out,iid_is(riid
)] void **ppv
644 HRESULT FormatForDisplay
(
645 [in] REFPROPERTYKEY key
,
646 [in] REFPROPVARIANT propvar
,
647 [in] PROPDESC_FORMAT_FLAGS pdff
,
648 [out,string,size_is(cchText
)] LPWSTR pszText
,
651 HRESULT FormatForDisplayAlloc
(
652 [in] REFPROPERTYKEY key
,
653 [in] REFPROPVARIANT propvar
,
654 [in] PROPDESC_FORMAT_FLAGS pdff
,
655 [out,string] LPWSTR
*pszText
657 HRESULT RegisterPropertySchema
(
658 [in,string] LPCWSTR pszPath
660 HRESULT UnregisterPropertySchema
(
661 [in,string] LPCWSTR pszPath
663 HRESULT RefreshPropertySchema
(void);
667 uuid(1f9fc1d0
-c39b
-4b26
-817f
-011967d3440e
),
669 pointer_default(unique)
671 interface IPropertyDescriptionList
: IUnknown
679 [out,iid_is(riid
)] void **ppv
684 uuid(bc110b6d
-57e8
-4148-a9c6
-91015ab2f3a5
),
686 pointer_default(unique)
688 interface IPropertyStoreFactory
: IUnknown
690 HRESULT GetPropertyStore
(
691 [in] GETPROPERTYSTOREFLAGS flags
,
692 [in,unique] IUnknown
*pUnkFactory
,
694 [out,iid_is(riid
)] void **ppv
696 HRESULT GetPropertyStoreForKeys
(
697 [in,unique] const PROPERTYKEY
*rgKeys
,
699 [in] GETPROPERTYSTOREFLAGS flags
,
701 [out,iid_is(riid
)] void **ppv
706 uuid(40d4577f
-e237
-4bdb
-bd69
-58f089431b6a
),
708 pointer_default(unique)
710 interface IDelayedPropertyStoreFactory
: IPropertyStoreFactory
712 HRESULT GetDelayedPropertyStore
(
713 [in] GETPROPERTYSTOREFLAGS flags
,
714 [in] DWORD dwStoreId
,
716 [out,iid_is(riid
)] void **ppv
720 [v1_enum] enum _PERSIST_SPROPSTORE_FLAGS
725 typedef int PERSIST_SPROPSTORE_FLAGS
;
727 typedef struct tagSERIALIZEDROPSTORAGE SERIALIZEDPROPSTORAGE
;
729 cpp_quote
("#if 0") /* Wine doesn't have __unaligned builtin, hack */
730 typedef SERIALIZEDPROPSTORAGE
*PUSERIALIZEDPROPSTORAGE
;
731 typedef const SERIALIZEDPROPSTORAGE
*PCUSERIALIZEDPROPSTORAGE
;
733 cpp_quote
("typedef SERIALIZEDPROPSTORAGE UNALIGNED *PUSERIALIZEDPROPSTORAGE;")
734 cpp_quote
("typedef const SERIALIZEDPROPSTORAGE UNALIGNED *PCUSERIALIZEDPROPSTORAGE;")
737 uuid(e318ad57
-0aa0
-450f
-aca5
-6fab7103d917
),
738 pointer_default(unique),
741 interface IPersistSerializedPropStorage
: IUnknown
744 [in] PERSIST_SPROPSTORE_FLAGS flags
746 HRESULT SetPropertyStorage
(
747 [in] PCUSERIALIZEDPROPSTORAGE psps
,
750 HRESULT GetPropertyStorage
(
751 [out] SERIALIZEDPROPSTORAGE
**psps
,
757 uuid(77effa68
-4f98
-4366-ba72
-573b3d880571
),
758 pointer_default(unique),
761 interface IPersistSerializedPropStorage2
: IPersistSerializedPropStorage
763 HRESULT GetpropertyStorageSize
(
766 HRESULT GetPropertyStorageBuffer
(
767 [out] SERIALIZEDPROPSTORAGE
*psps
,
769 [out] DWORD
*pcbWritten
774 uuid(fa955fd9
-38be
-4879-a6ce
-824cf52d609f
),
776 pointer_default(unique)
778 interface IPropertySystemChangeNotify
: IUnknown
780 HRESULT SchemaRefreshed
(void);
783 /* Interface for CoCreateInstance? */
785 uuid(75121952-e0d0
-43e5
-9380-1d80483acf72
),
786 pointer_default(unique)
788 interface ICreateObject
: IUnknown
790 HRESULT CreateObject
(
792 [in,unique] IUnknown
*pUnkOuter
,
794 [out,iid_is(riid
)] void **ppv
798 cpp_quote
("#define PKEY_PIDSTR_MAX 10")
799 cpp_quote
("#define GUIDSTRING_MAX 39")
800 cpp_quote
("#define PKEYSTR_MAX (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)")
802 cpp_quote
("HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY,LPWSTR,UINT);")
803 cpp_quote
("HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR,PROPERTYKEY*);")
805 /* TODO: Add remainder of the C api here */
808 uuid(2cda3294
-6c4f
-4020-b161
-27c530c81fa6
),
812 library PropSysObjects
814 [uuid(9a02e012
-6303-4e1e
-b9a1
-630f802592c5
)] coclass InMemoryPropertyStore
816 interface IPropertyStore
;
818 [uuid(b8967f86
-58ae
-4f96
-9fb2
-5d7904798f4b
)] coclass PropertySystem
820 interface IPropertySystem
;