Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Tough Windows Shell Question

This topic is 5935 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, thanks to LessBread, I now know, that I can retrieve Information on directories using the Windows Shell. BUT: I manage to browse through the "My Computer" virtual directory (Address is "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -- who the **** could come up with such nonsense -- or is it sensible and I am just to stupid to understand??). But how can I browse through its subdirectories? I understand, that I use "GetDisplayNameOf" to retrieve the names of the folders. And I can specify the flag "SHGDN_FORADDRESSBAR" to retrieve "C:\" instead of "Local Device (C:\)". However, in the description of "GetDisplayNameOf", MS states: "The type of name returned in this structure can be the requested type, but the Shell folder might return a different type." Let me repeat: "_CAN_ be the requested type.". So basically, no matter what flag I pass, I always get "Local Device (C:\)". Sorry: Maybe I am just too stupid. Maybe I am just too tired. But if you ask my opinion right now: How the **** can windows work? This is one of the most terrible interfaces I have ever seen!! Sorry guys: This has been quite long and mostly it''s just me whining. However: If one of you just feels in the mood to point me to a good (easy to understand?!) description of the Windows shell, or better: has an idea how to (simply???) retrieve all folders and subfolders of a system, I''d really be grateful!!! Now, for me it''s the bed! Thanks for your patience. Good night, Beren

Share this post

Link to post
Share on other sites
The GUID you use to get the desktop folder makes sense because it''s implement as a COM object, and that''s the class id of the object which implements it.

You should be using the SHGetDesktopFolder to get a IShellFolder folder which represents the desktop folder (much easier to remember than that GUID as well)

Once you''ve got the IShellFolder object, you would use the IShellFolder::EnumObject method to enumerate all the sub-objects (i.e. hard disk drives, shell extensions, etc) underneath it.

It''ll take some reading in MSDN to fully understand it, but it''s not all that difficult, really. You must realise that the reason for this design is that the shell represents not only physical storage devices (like files) but also somewhat more abstract devices, like printers and network folders.

If I had my way, I''d have all of you shot!

codeka.com - Just click it.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!