Question

I'm new to the topic shell extensions and I'm looking for resources about namespace extensions. I would like to write a namespace extension which supports SFTP with all options to browse like FTP in the explorer.

I read the examples 1, 2 of zengxi from codeproject, but they don't compile right and seems to be old. I think that there were also many changes like the folder selection in the address bar.

Can somebody provide me some resources in the right direction or some working examples?

UPDATE: It is important that the source is free. This is a non-profit project.

At the moment I found a good source on the MSDN called Explorer Data Provider Sample. This is up to date and provides some aliases Explorer Data Provider and Shell Data Source. What is yet missing is drop & drag support and a glue for supporting protocol links.

For future usage it would be great to find a way to associate a file extension with that shell data source like zip files.

Was it helpful?

Solution 2

For Drag&Drop, this series of articles are a great point to start. After I understood that the files must have the flag can copy, can move, etc. I had almost the solution. The magic was to add one line in GetAttributesOf:

*rgfInOut |= SFGAO_CANCOPY|SFGAO_CANMOVE;

Also I had to publish the IDataObject in GetUIObjectOf like this:

if(riid == IID_IDataObject) {
    PWSTR pszName;
    hr = _GetName(apidl[0], &pszName);
    hr = SHCreateDataObject(m_pidl, cidl, apidl,
                            new CFileDataObject(pszName), riid, ppv);
} else if(riid == IID_IDropTarget) {
    // TODO publish
    return E_NOINTERFACE;
}

That's all.

By the way what is the best practice for allocating CFileDataObject here?

OTHER TIPS

Here is the full example of creating a namespace to mapping real files on Flickr. However, only source codes available. No tutorial. Hope it helps.... http://www.viksoe.dk/code/flickrdrive.htm

Take a look at the EZNamespaceExtensionsMFC library which makes it very easy to develop namespace extensions. Check out its FileBrowser and RegBrowser samples which you can use a starting point.

DISCLAIMER: I work for LogicNP Software, the developer of EZNamespaceExtensionsMFC

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top