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

  • SEARCH
  • Home
  • 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 6879671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:52:33+00:00 2026-05-27T04:52:33+00:00

I’ve been researching how to implement a Namespace Extension. The NSE should show files

  • 0

I’ve been researching how to implement a Namespace Extension.

The NSE should show files and folders (they are physical files and folders, but located elsewhere on the disk).

Also, the NSE must behave as closely as possible to the normal Explorer view, e.g. it must have:

  • Context menus that would normally appear in a normal Explorer view that are applicable to the file/folder(s) chosen
  • Drag and drop (both of files/folders and other things like Document Scraps)
  • ‘Right Drag and Drop’ (e.g. 7Zips ‘Extract here…’)
  • Clipboard Copy/Cut/Paste
  • Share With entries
  • Any registered Shell Icon Overlay Handlers must work (e.g. Tortoise SVN/GIT)
  • Column sizing/re-ordering
  • View customisation, including ordering and grouping

So, basically anything the Explorer view can do so must we.

Looking at all the things that Explorer can do (that I used to take for granted), I felt a bit overwhelmed.

Because I’m both lazy and a realist (I realise it’d be near impossible to replicate all this functionality without issue), my plan is to reuse the functionality of the Explorer view in my NSE.

I’ve looked at various samples of NSEs. Most of these use virtual data, but as I said, I’m representing physical files and folder elsewhere on the disk. I’ve also read about the SHCreateShellFolderView method.

Armed with this information, I thought it’d be a relatively simple case of providing a PIDL of my root folder and then in my IShellFolder::CreateViewObject call SHCreateShellFolder method. Here is that method:

STDMETHODIMP CShellFolderImpl::CreateViewObject( 
    HWND hwndOwner, 
    REFIID riid, 
    void** ppvOut )
{
    HRESULT hr=E_NOINTERFACE;

    if ( NULL == ppvOut )
        return E_POINTER;

    *ppvOut = NULL;

    if (riid == IID_IShellView)
    {
        SFV_CREATE SfvCreate = 
        {
            sizeof(SFV_CREATE) 
        };


        if (SUCCEEDED(hr = QueryInterface(IID_PPV_ARGS(&SfvCreate.pshf))))
        {
            hr = ::SHCreateShellFolderView(
                &SfvCreate, 
                reinterpret_cast<IShellView **>(ppvOut));
        }

        SfvCreate.pshf->Release();
    }
    else if (riid == IID_ITransferSource)
    {

    }

    return hr;
}

No such luck with that. SHCreateShellFolderView was always returning E_NOTIMPL. Turns out that this is because it requires a pointer to something implementing IShellFolder2 (and IPersist2 for GetCurFolder where I can provide my PIDL). My folder just implemented IShellFolder and IPerist.

So after changing these to implement the newer interfaces, I got… nothing! The NSE would be loaded by Explorer, the constructor would be called, but immediately after, the destructor would be called. If I changed the interfaces back to how they were, it fired up (but still with the same problem).

I’ve since been looking for a sample that implements IShellFolder2, but again, the documentation is as bad as it is for the rest of these APIs.

How can I use SHCreateShellFolderView so that I don’t have to reimplement everything Explorer already does?

  • 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-27T04:52:33+00:00Added an answer on May 27, 2026 at 4:52 am

    Even if you are able to use and embed a Windows Explorer window for your namespace extension, the problem is that you are no longer in control of what it does. For example, if the user double-clicks on a folder, the actual filesystem folder will be browsed, not your namespace extension node which represents the filesystem folder.

    Your only option is to do your own implementation. Check out EZNamespaceExtensionsMFC which makes it very easy to develop namespace extensions. It has a “FileSystemBrowser” sample which you can use as a starting point.

    DISCLAIMER: I work for LogicNP, the developers of EZNamespaceExtensionsMFC.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I want to construct a data frame in an Rcpp function, but when I
I have thousands of HTML files to process using Groovy/Java and I need to

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.