Solved

Custom Properties for "virtual folders" in windows explorer

Posted on 1998-07-26
2
413 Views
Last Modified: 2013-12-03
Experts Exchange,

I am developing an application that includes adding a "virtual folder" to the windows explorer tree at the same level as A:\, C:\, D:\, Control Panel etc…., by using the Shell Library Interfaces.

To this "virtual folder" have I attached a context menu handler, and by registering the default flag SFGAO_HASPROPSHEET for this folder, have I managed to enable the "Properties" menu option in the context menu. To this "properties" menu option is my goal to attach custom designed property pages, including a custom first page.

My problem is that when I select the "properties" menu option I get a message from the system telling me that " the needed methods for the object are not available". I have tried to solve the problem with the "IshellPropSheetExt" interface, but as i understand is this interface only for adding extra property pages to standard file property pages.

So, my questions are how do I implement the interface for custom designed property pages, including a custom first page, attached to a "virtual folder" in the windows explorer? As always is there any good sample that shows this mechanism?

I have noticed that in the file Shlguid.h is there Shell Library Interfaces defined but not documented at all. There is for instance an interface ID called "IID_IPropSheetPage". Is it perhaps this interface i should use, and if so where can i find documents that describe this. Is it perhaps interfaces only known by Microsoft?

Best regards

0
Comment
Question by:StefanJo
2 Comments
 

Author Comment

by:StefanJo
ID: 1411064
Adjusted points to 200
0
 

Accepted Solution

by:
DmitryC earned 200 total points
ID: 1411065
Hi,

In case when namespace extension (AKA virtual folder) has got SFGAO_HASPROPSHEET bit set, shell looks for IPropSheetExt CLSID's in the following location:
HKEY_CLASSES_ROOT\CLSID\{your virtual folder CLSID}\ShellEx\PropertySheetHandlers\{your propsheetext CLSID}

It asks to create instance of {your propsheetext CLSID} with IShellExtInit interface. After the Initialize call succeeds it QueryInterfase's it for IPropSheetExt.

Also, try to look at your IContextMenu's InvokeCommand calls. It is possible that shell will call it with "properties" verb and ask to display PropertySheet dialog by yourself.

My extension is rooted from Desktop and I tried to put it into My Computer (as you did) also - it works fine.

Regards,
Dima
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question