Page 1 of 1

How to read File Properties

Posted: 27 Feb 2017 6:35
by Peter Muraya
Hi all,
Recently I'm dealing with lots of data that come as images that have important metadata for us.
The metadata are packaged as file properties, visible when you right click on an image in Windows explorer. I need to read access this from a Visual Prolog program. How can I easily do this? I'm confused by what I read on the internet about NFTS and Alternate Data Streams as the mechanism that is used for storing such information but cannot figure out where to go from there. Thank you all for all the help I get from this forum.

Posted: 27 Feb 2017 10:10
by Thomas Linder Puls
It is outside my expertise.

It seems that the Windows Imaging Component can be used for that.

It is COM based but Microsoft has (which is becoming more and more the rule) not provided a COM type library for this component. Instead there are C++ headers and IDL files.

Without a type library our COM import mechanism does not work. And that means one of three things:
  • Manually create Visual Prolog classes and interfaces for what you need
  • Create a type library using the MIDL compiler and the provided IDL files
  • Find another API
All files are in the Windows 10 SDK.

Posted: 28 Feb 2017 1:42
by Peter Muraya
Thank you Thomas. I followed the two references you gave me; the Windows Imaging Component is relevant to what I'm looking for, but it seems too complicated for what I though would be a simple task. I will study it a little bit harder and look for alternative libraries as you suggested. Thanks again.