OK I figured out what's wrong with the sample code.
Apparently you have to call TrySave AFTER setting the metadata instead of
before like they have in the sample.
Also, the SetQuery method didn't work for me very well so I set the KeyWords
property of the Writer instead and that works like a charm.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <Steve@Orr.net> wrote in
message news:C96828D5-5AFB-4182-81EE-6B9B9AB3587E@microsoft.com...
> This sample code doesn't seem to work:
> http://msdn2.microsoft.com/en-US/lib...atawriter.aspx
>
> It executes without error, but modifications to the metadata do not seem
> to persist to disk.
> Reading the metadata works perfectly, but changes to the metadata just
> don't seem to stick.
>
> Does anybody know how can I programmatically modify the metadata for an
> image file?
>
> In case it matters, I'm using the release version of Vista 64-bit
> ultimate.
>
>
>
>