locked
IStorageItemInformation

    Question

  • I need some file information from files, including the name, thumbnail, and duration of video files.  I have found that the IStorageItemInformation interface has what I need.  The only class I have been able to find that inherits from IStorageItemInformation is FileInformation and other classes in the Windows::Storage::BulkAccess namespace.  FileInformation should work when I want the thumbnails, etc, of files in the Videos folder, but is there something equivalent for a Windows::Storage::StorageFile I already have open?  Ideally, I'd like a solution that works in both cases (Videos folder and open files) to simplify the code.

    Andrea Mantler

    Tuesday, November 20, 2012 11:28 PM

Answers

  • As far as I know, there is no such interface.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Andrea Mantler Tuesday, November 27, 2012 5:58 PM
    Tuesday, November 27, 2012 6:46 AM

All replies

  • Hi,

    There is a property that we can get the video tile, duration time or other information.
    VideoProperties class (Windows)
    http://msdn.microsoft.com/zh-cn/library/windows/apps/windows.storage.fileproperties.videoproperties

    You can follow the sample codes in that document.

    For the Thumbnail, you should use GetThumbnailAsync function, please check this
    http://msdn.microsoft.com/en-us/library/windows/apps/hh465350.aspx
     
    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Proposed as answer by Jesse Jiang Monday, November 26, 2012 7:33 AM
    Thursday, November 22, 2012 6:21 AM
  • Thanks!  I did end up figuring out how to get the information as you described, but FileInformation and StorageFile don't seem to have an interface that has all the properties in common, and, so, even though the code for each method is identical, I still need two methods because of the different types.  Do you know of an interface for both of these that has all of the information accessible?  Thanks!

    Cheers,
    Andrea


    Andrea Mantler


    Monday, November 26, 2012 5:31 PM
  • As far as I know, there is no such interface.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Andrea Mantler Tuesday, November 27, 2012 5:58 PM
    Tuesday, November 27, 2012 6:46 AM
  • That's disappointing.  Thank you for your help.

    Andrea Mantler

    Tuesday, November 27, 2012 5:59 PM