[python-win32] How to set value with PyIPropertyStore

Peng Chen capaneus at gmail.com
Thu Nov 14 19:15:54 EST 2019


Nah, thanks, the stuff I'm trying to do is actually quite simple.
I try to read the "Encoded date" info from video file, apply a timeshift
and write it back.
I searched a few different libs, they are either works for image files only
or it's read only and I can't write.
So I thought of pywin32 and really didn't expect this coming...

Thanks!

On Mon, Nov 11, 2019 at 5:24 AM Tim Roberts <timr at probo.com> wrote:

> 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.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20191115/344700a7/attachment.html>


More information about the python-win32 mailing list