Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 692997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:42:30+00:00 2026-05-14T02:42:30+00:00

I have a simple file browser and there I display files and folders, obtained

  • 0

I have a simple file browser and there I display files and folders,

obtained by (for directory)

SHFILEINFO info = new SHFILEINFO();
SHGetFileInfo(filename,
FILE_ATTRIBUTE_DIRECTORY,
ref info,Marshal.SizeOf(info),
SHGFI_ICON | SHGFI_USEFILEATTRIBUTES | SHGFI_SMALLICON | SHGFI_ADDOVERLAYS);

It works 100% fine, but I have noticed an oddity – if I try to obtain an icon for directory, but specify FILE_ATTRIBUTE_NORMAL instead of FILE_ATTRIBUTE_DIRECTORY
but it does weird stuff for directories – normal folders have “unknown file type white paper” icons, recycle bin has VLC icon, etc. Directories under SVN have proper overlay, but base file icon (white sheet of paper).

I understand that base icon for directory would now be the one of unknown file, but why do some folders have totally strange icon? Config.MSI has installer icon, recycle bin has VLC icon (wtf?!), etc. What does the shell function do with this parameters? Exactly what icon does it obtain?

Again, this is not a problem, I’m just curious.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:42:31+00:00Added an answer on May 14, 2026 at 2:42 am

    As far as I know icon resources are accessed by their numeric index, so my guess is that the right index is fetched, and the icon is then fetched from either the wrong library, or from the right one but using wrong offset+correct index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a simple file browser on our intranet, built using ASP/vbscript. The files
I have a binary file - Windows static library (*.lib). Is there a simple
I have implemented a simple file upload-download mechanism. When a user clicks a file
I have a simple WPF (XAML) file that has some animated shapes and text.
I have a simple NAnt build file, which attempts to perform an update from
I am implementing a very simple file database. I have 2 basic operations: void
I have a problem with a simple included file. The file being included is
I have a simple report that I want to export to a CSV file.
K... I'm doing something obviously wrong. I have a simple page with a file
I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.