Created
August 7, 2016 10:59
-
-
Save LGM-AdrianHum/25d41d5efe6077e95a794b9693a42c53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Main(string[] args) | |
{ | |
List<string> arrHeaders = new List<string>(); | |
Shell32.Shell shell = new Shell32.Shell(); | |
Shell32.Folder objFolder; | |
objFolder = shell.NameSpace(@"C:\temp\testprop"); | |
for( int i = 0; i < short.MaxValue; i++ ) | |
{ | |
string header = objFolder.GetDetailsOf(null, i); | |
if (String.IsNullOrEmpty(header)) | |
break; | |
arrHeaders.Add(header); | |
} | |
foreach(Shell32.FolderItem2 item in objFolder.Items()) | |
{ | |
for (int i = 0; i < arrHeaders.Count; i++) | |
{ | |
Console.WriteLine("{0}\t{1}: {2}", i, arrHeaders[i], objFolder.GetDetailsOf(item, i)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add a reference to Microsoft Shell Controls and Automation from the COM tab of the References dialog.