用Windows 7集成编写命名空间扩展 [英] Writing namespace extensions with Windows 7 integration

查看:93
本文介绍了用Windows 7集成编写命名空间扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新主题shell扩展,我正在寻找关于命名空间扩展的资源。

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.

我读了一些例子 1 2 从代码项目,但他们不编译正确,似乎是老。我认为还有许多变化,如地址栏中的文件夹选择。

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:
源是免费的。这是一个非营利项目。

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

目前我在MSDN上找到一个很好的来源,名为 Explorer数据提供程序示例。这是最新的,并提供了一些别名 Explorer Data Provider Shell数据源。还缺少的是drop&

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.

为了将来的使用,找到一种将文件扩展名与 shell关联的方法是很好的

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

推荐答案

对于Drag& Drop,本系列文章是一个伟大的开始。后我明白了文件必须有标志可以复制,可以移动等。我几乎有解决方案。神奇的是在 GetAttributesOf 中添加一行:

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;

此外,我还必须发布 IDataObject GetUIObjectOf 像这样:

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;
}

就是这样。

这里分配 CFileDataObject 的最佳做法是什么?

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

这篇关于用Windows 7集成编写命名空间扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆