detailed file information (not icon) using shell32 pinvoke

G

Guest

I've seen many examples of how to call SHGetFileInfo in shell32.dll to get a
files associated icon, but I can't find anywhere how to get the file
information (size, last date modified, etc, etc) out of shell32 using pinvoke.

I have however seen how to get this information using COM:
Shell32.Shell shell = new Shell32.ShellClass();
Shell32.Folder folder = shell.NameSpace("C:\\");
Shell32.FolderItem folderItem = folder.ParseName("test.doc");

but can you get this using pinvoke? If not, is it bad to use both COM and
pinvoke at the same time?
 
M

Mattias Sjögren

but I can't find anywhere how to get the file
information (size, last date modified, etc, etc) out of shell32 using pinvoke.

The File and FileInfo classes in the System.IO namespace can provide
that information. No P/Invoking needed.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top