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 op
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
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
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?