Getting file type

  • Thread starter Thread starter jack
  • Start date Start date
J

jack

Hi,

Im creating a program in which im trying display a file list in the
listview. similar as windows explorer detailed view.
im able to get every thing except the file type.
im stuck here and could not file any example on net.

Please help
 
Hi jack,

Basicly the information about the types is in the windows registry, explore
it to obtain any meta data (the framework can do it).
See more there: http://www.blackwasp.co.uk/ProgrammaticFileTypes.aspx

Kind Regards, Alex Meleta
[TechBlog] http://devkids.blogspot.com



j> Hi,
j>
j> Im creating a program in which im trying display a file list in the
j> listview. similar as windows explorer detailed view.
j> im able to get every thing except the file type.
j> im stuck here and could not file any example on net.
j> Please help
j>
 
While the file type information is contained in the registry in some
cases, that is an implementation detail, and not always the case. Shell
extensions can easily provide different information than what is contained
in the registry.

Rather, the OP needs to call the SHGetFileInfo function through the
P/Invoke layer, passing the SHGFI_TYPENAME flag to get a string that
describes the file's type.
 

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

Back
Top