A module, encapsulating the Vista Property System interfaces
-
Retrieves the property store for a shell item
-
Gets a description interface for a property
-
Creates an IPropertySystem interface
-
Retrieves the canonical name for a property key
-
Retrieves the property key by canonical name
-
Registers a group of properties described in a schema file
-
Removes a property schema definition
-
SHGetPropertyStoreFromParsingName
Retrieves the property store for an item by path
-
Serializes a PyPROPVARIANT
-
Creates a PyPROPVARIANT from a serialized buffer
-
Creates a temporary property store that is not connected to any backing storage
-
PSCreatePropertyStoreFromPropertySetStorage
Wraps a PyIPropertySetStorage interface in a PyIPropertyStore object
-
Returns the GUID of the property handler for a file
-
Retrieves a collection of a window's properties
-
PSGetPropertyFromPropertyStorage
Extracts a property from a serialized buffer by key
-
PSGetNamedPropertyFromPropertyStorage
Extracts a property from a serialized buffer by name
-
Creates a PyIPropertyChange interface used to apply changes to a PyPROPVARIANT
-
Creates a PyIPropertyChangeArray interface to be used with PyIFileOperation
-
Sets the default properties for a file.
propsys.PSCreateMemoryPropertyStore
PyIPropertyStore = PSCreateMemoryPropertyStore(riid) Creates a temporary property store that is not connected to any backing storage
-
riid=IID_IPropertyStore : PyIID
The interface to create
May also be used to create PyINamedPropertyStore, PyIPropertyStoreCache, PyIPersistStream, or PyIPropertyBag
propsys.PSCreatePropertyChangeArray
PyIPropertyChangeArray = PSCreatePropertyChangeArray() Creates an IPropertyChangeArray interface to be used with PyIFileOperation
Currently only creates an empty array to be filled in later
propsys.PSCreatePropertyStoreFromPropertySetStorage
PyIPropertyStore = PSCreatePropertyStoreFromPropertySetStorage(pss, Mode
, riid
) Wraps a PyIPropertySetStorage interface in a PyIPropertyStore object
-
pss : PyIPropertySetStorage
Property container to be adapted
-
Mode : int
Read or write mode, shellcon.STGM_*. Must match mode used to open input interface.
-
riid=IID_IPropertyStore : PyIID
The interface to create
This function does not work for the NTFS property storage implementation based on
alternate data streams.
propsys.PSCreateSimplePropertyChange
PyIPropertyChange = PSCreateSimplePropertyChange(flags, key
, val
, riid
) Creates an IPropertyChange interface used to apply changes to a PyPROPVARIANT
-
flags : int
The change operation, pscon.PKA_*
-
key : PyPROPERTYKEY
The property key
-
val : PyPROPVARIANT
The value that the change operation will apply
-
riid=IID_IPropertyChange : PyIID
The interface to return.
propsys.PSGetItemPropertyHandler
PyIPropertyStore = PSGetItemPropertyHandler(Item, ReadWrite
, riid
) Retrieves the property store for a shell item
-
Item : PyIShellItem
A shell item
-
ReadWrite=False : bool
Pass True for a writeable property store
-
riid=IID_IPropertyStore : PyIID
Interface to return
propsys.PSGetNameFromPropertyKey
string = PSGetNameFromPropertyKey(Key) Retrieves the canonical name of a property
-
Key : PyPROPERTYKEY
A property key
propsys.PSGetNamedPropertyFromPropertyStorage
PyPROPVARIANT = PSGetNamedPropertyFromPropertyStorage(ps, name
) Extracts a property value from a serialized buffer by name
-
ps : buffer
Bytes or buffer (or str in python 2) containing a serialized property set (see PyIPersistSerializedPropStorage::GetPropertyStorage)
-
name : str
Property to return
propsys.PSGetPropertyDescription
PyIPropertyDescription = PSGetPropertyDescription(Key, riid
) Gets a description interface for a property
-
Key : PyPROPERTYKEY
A property key identifier
-
riid=IID_IPropertyDescription : PyIID
The interface to return
Possible interfaces include IPropertyDescription, IPropertyDescriptionAliasInfo, and IPropertyDescriptionSearchInfo
propsys.PSGetPropertyFromPropertyStorage
PyPROPVARIANT = PSGetPropertyFromPropertyStorage(ps, key
) Extracts a property value from a serialized buffer by key
-
ps : buffer
Bytes or buffer (or str in python 2) containing a serialized property set (see PyIPersistSerializedPropStorage::GetPropertyStorage)
-
key : PyPROPERTYKEY
Property to return
propsys.PSGetPropertyKeyFromName
PyPROPERTYKEY = PSGetPropertyKeyFromName(Name) Retrieves the property key by canonical name
-
Name : str
The canonical name of a property (eg System.Author)
propsys.PSGetPropertySystem
PyIPropertySystem = PSGetPropertySystem(riid) Creates an IPropertySystem interface
-
riid=IID_IPropertySystem : PyIID
The interface to return
propsys.PSLookupPropertyHandlerCLSID
PyIID = PSLookupPropertyHandlerCLSID(FilePath) Returns the GUID of the property handler for a file
-
FilePath : str
Name of file
If no handler is found, the returned error code can be deceptive as it seems to indicate
that the file itself was not found
propsys.PSRegisterPropertySchema
PSRegisterPropertySchema(filename) Registers a group of properties described in a schema file
-
filename : unicode
An XML file that defines a property schema (*.propdesc)
propsys.PSUnregisterPropertySchema
PSUnregisterPropertySchema(filename) Removes a property schema definition
-
filename : unicode
A previously registered schema definition file
propsys.SHGetPropertyStoreForWindow
PyIPropertyStore = SHGetPropertyStoreForWindow(hwnd, riid
) Retrieves a collection of a window's properties
Requires Windows 7 or later.
The returned store can be used to set the System.AppUserModel.ID property that determines how windows
are grouped on the taskbar
propsys.SHGetPropertyStoreFromParsingName
PyIPropertyStore = SHGetPropertyStoreFromParsingName(Path, BindCtx
, Flags
, riid
) Retrieves the property store for an item by path
-
Path : string
Path to file
-
BindCtx=None : PyIBindCtx
Bind context, or None
-
Flags=GPS_DEFAULT : int
Combination of GETPROPERTYSTOREFLAGS values (shellcon.GPS_*)
-
riid=IID_IPropertyStore : PyIID
The interface to return
This function does not exist on XP, even with Desktop Search installed
propsys.SHSetDefaultProperties
SHSetDefaultProperties(hwnd, Item, FileOpFlags, Sink) Sets the default properties for a file.
-
hwnd : PyHANDLE
Parent window for any notifications, can be None
-
Item : PyIShellItem
Shell item whose defaults are to be set
-
FileOpFlags=0 : int
File operation flags, as used with PyIFileOperation::SetOperationFlags
-
Sink=None : PyGFileOperationProgressSink
Event sink to receive notifications
Default properties are registered by filetype under SetDefaultsFor value.
propsys.StgDeserializePropVariant
PyPROPVARIANT = StgDeserializePropVariant(prop) Creates a PyPROPVARIANT from a serialized buffer
-
prop : bytes
Buffer or bytes object (or str in Python 2) containing a serialized value
propsys.StgSerializePropVariant
bytes = StgSerializePropVariant(propvar) Serializes a PyPROPVARIANT
-
propvar : PyPROPVARIANT
The value to serialize