Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. The GetDetailsOf() Method

The GetDetailsOf() Method

Scheduled Pinned Locked Moved C#
databasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ankit Rajpoot
    wrote on last edited by
    #1

    Hello friends, I'm writing a program that reads all the files in a specified folder and stores their attributes in a MS-Access database. I'm using the FileInfo, and the FileVersionInfo classes to query file attributes. But these classes don't expose properties or methods to query advanced attributes such as image dimensions, ablum title, etc. I googled to find out the answer and it came up with GetDetailsOf method of shell32.dll. It seems that the GetDetailsOf method would be a perfect fit for my purpose as I only need to read that info. But what is really worrying me is its portability. The second argument is an integer and it specifies the info. to be retrieved. Is its value consistent across all Windows versions. I just want to make sure that I don't get two different values for the same file, with the same integer value under different Windows versions. Many thanks in advance

    D 1 Reply Last reply
    0
    • A Ankit Rajpoot

      Hello friends, I'm writing a program that reads all the files in a specified folder and stores their attributes in a MS-Access database. I'm using the FileInfo, and the FileVersionInfo classes to query file attributes. But these classes don't expose properties or methods to query advanced attributes such as image dimensions, ablum title, etc. I googled to find out the answer and it came up with GetDetailsOf method of shell32.dll. It seems that the GetDetailsOf method would be a perfect fit for my purpose as I only need to read that info. But what is really worrying me is its portability. The second argument is an integer and it specifies the info. to be retrieved. Is its value consistent across all Windows versions. I just want to make sure that I don't get two different values for the same file, with the same integer value under different Windows versions. Many thanks in advance

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Yes, those constants are the same from version to version. They won't change the constants, only add to them.

      Ankit Rajpoot wrote:

      But what is really worrying me is its portability.

      What's your definition of "portability" and your concerns? Which platforms are you going to look at supporting? Or were you just referring to the constants passed to the GetDetailsOf method?

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Yes, those constants are the same from version to version. They won't change the constants, only add to them.

        Ankit Rajpoot wrote:

        But what is really worrying me is its portability.

        What's your definition of "portability" and your concerns? Which platforms are you going to look at supporting? Or were you just referring to the constants passed to the GetDetailsOf method?

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        A Offline
        A Offline
        Ankit Rajpoot
        wrote on last edited by
        #3

        Hello Sir, I'm planning to support Win98 and later versions of Windows. I've Windows XP SP2 on my Development machine. So I need to make sure that the code that I write and test on Xp runs on earlier versions too and on Vista too. What I'm worried about is that the constant-value to file-attribute mapping is same on all Windows versions or not. For example, passing 15 returns the Artist's name from the file. Is it true for all Windows versions.

        D 1 Reply Last reply
        0
        • A Ankit Rajpoot

          Hello Sir, I'm planning to support Win98 and later versions of Windows. I've Windows XP SP2 on my Development machine. So I need to make sure that the code that I write and test on Xp runs on earlier versions too and on Vista too. What I'm worried about is that the constant-value to file-attribute mapping is same on all Windows versions or not. For example, passing 15 returns the Artist's name from the file. Is it true for all Windows versions.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Ankit Rajpoot wrote:

          What I'm worried about is that the constant-value to file-attribute mapping is same on all Windows versions or not. For example, passing 15 returns the Artist's name from the file. Is it true for all Windows versions.

          Yes, it is. If there are any changes, they are additions to the constant list. All previous constants will work the same way they did in previous versions of Win32.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups