[python-win32] How to set value with PyIPropertyStore
Tim Roberts
timr at probo.com
Mon Nov 11 00:23:47 EST 2019
On Nov 10, 2019, at 4:13 PM, Peng Chen <capaneus at gmail.com> wrote:
>
> then I tried
> riid = ""
> ctx = None
> properties = propsys.SHGetPropertyStoreFromParsingName(
> file_name, ctx, shellcon.GPS_READWRITE, riid)
> it reported:
> (-2147221005, 'Invalid Class String', None, None)
That’s correct. “” is not a valid class string. SHGetPropertyStoreFromParsingName returns a COM interface, and you have to tell it what interface you want. It is usually IPropertyStore.
What are you trying to do here? Are you porting some C++ code you found into Python?
—
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20191110/c45e3a6e/attachment.html>
More information about the python-win32
mailing list