By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,967 Members | 1,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,967 IT Pros & Developers. It's quick & easy.

detailed file information (not icon) using shell32 pinvoke

P: n/a
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?
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #2

P: n/a
Incidentally check out pinvoke.net anytime you have doubts about whether or
not to use a dll export. They have a very neat VS add-in too.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.