As far as I know there is no way to get this information directly through managed code. The unmanaged equivalent is SHGetFileInfo. The KB article http://support.microsoft.com/default.aspx/kb/319350 will tell you how to use the function in managed code.
As for getting comments and whatnot these are actually stored as data in a secondary stream. I think you'll end up using unmanaged code to get to them because NTFS streams are not exposed directly in .NET. Fortunately it is pretty straightforward as the standard file IO API works with streams as well. I believe the syntax is filename:streamname but I'm not 100% sure. Look up the help for File Streams in MSDN to get the actual syntax. Unfortunately I believe the .NET stream readers will fail with the syntax.
Michael Taylor - 11/29/06
|