zoukankan      html  css  js  c++  java
  • windows shell 笔记 2

    Shell and Common Controls Versions / Shell and Shlwapi DLL Versions - Win32 apps | Microsoft Docs

    DLL Version Numbers

    Shell documentation are contained in two DLLs: Shell32.dll and Shlwapi.dll

    Project (application) Versions

    macros are present in the header files

    #define _WIN32_IE 0x0400
    #include <commctrl.h>

    Implementing the Basic Folder Object Interfaces - Win32 apps | Microsoft Docs

    implementing a namespace extension.
    basic, primary and optional interfaces.

    Basic Implementation and Registration

    As an in-process COM server, your DLL must expose several standard functions and interfaces

    Registering an Extension

    a class identifier (CLSID) GUID for your extension (As with all COM objects)
    virtual junction points which could inherit from root folders?
    Shell namespace used in ComObjCreate.

    HKEY_CLASSES_ROOT
       CLSID
          {Extension CLSID}
             (Default) = MyExtension
             InfoTip = Some appropriate text
          DefaultIcon
          ShellFolder
             Attributes = 0xA00000020

    values and subkeys apply to extension.
    extensions with virtual junction points.
    attributes for root folders.

    Handling PIDLs

    Every item in the Shell namespace must have a unique PIDL
    Windows Explorer assigns a PIDL to your root folder
    each of its objects, particular object
    a display name and a parsing name to each object

    Shell and Shlwapi DLL Versions

    Specifying a Namespace Extension's Location - Win32 apps | Microsoft Docs

    Using Virtual Folders / File System Folders as Junction Points.
    define an extension's junction point.
    define a virtual junction point.
    system virtual folder: ControlPanel, Desktop, MyComputer,..

    理解shell命名空间扩展_开心乐源的专栏-CSDN博客

    Understanding Shell Namespace Extensions
    以下是作者对英文的翻译,节选了部分,后发现官方链接已是中文(机翻?)(可以切换为英文):
    了解 Shell 命名空间扩展 - Win32 apps | Microsoft Docs

    资源管理器提供数据结构映射为(图形化的)(非文件系统的文件夹的)虚拟文件夹/文件,称之为Shell命名空间扩展
    称为扩展因为/相较于Shell的经典(标准/基本)形式——关于文件系统的资源管理器。
    文件夹对应(映射)文件夹(COM)对象
    回收站等属于虚拟文件夹系统(区分于文件系统)。
    其他常见(Shell)扩展数码相机(设备)。
    Shell实现了默认的文件夹视图——DefView

    基本任务:

    命名空间导航文件夹,进而文件内容)。
    移动复制删除等管理内容。
    获取其他信息(文件属性?)。
    启动关联打开方式。

    GUI基本组成:

    TreeView。展开:文件夹相对位置,展开/折叠,复制/移动/删除,上下文菜单,搜索。
    Folder View,(较TreeView)额外包含文件内容(文件对象)、属性。其表现不限于传统/经典文件系统,如可以显示网页?

    Menu Bar and Toolbars菜单栏和工具栏。含标准按钮和菜单,例如复制和属性。可更改/自定义标准工具。

    Status Bar 状态栏。

    Windows Shell扩展编程基础-知网文化 (cnki.net)

    Windows Shell扩展编程基础_刘瞻.pdf(以下内容要结合原文看,为补充)

    狭义具象传统)文件系统——文件夹文件,相较而言有广义抽象的文件夹、文件,称为虚拟文件夹,如控制面板注册表浏览器回收站。(注册表浏览器中Shell View中不含子项,仅有
    Namespace可视为容器。对应Tree View(含子容器文件夹),不含项目文件)(对应Shell View))。
    扩展/Extension实为(通过COM方式)开发应用、用户自定义Namespace,亦即实例。较传统文件系统而言称为扩展。
    PIDL
    : Point to an ID List。标识,如关于文件、文件夹、控制面板等——浏览器中的项目(貌似PIDL没有这么广义,仅关乎文件夹)。指向数据结构指针句柄)——指向多级(顺序排列)item id的首级(首端)。
    ID List可看作容器(文件夹)项描述结构,进而Point ID List为入口。
    扩展/Extension,需实现COM接口:IShellFolder、IEnumIDList(枚举文件夹的内容)、IShellView(3?个必备基本,多个可选扩展接口)。
    绝对相对PIDL(没理解原文应用)。
    PIDL(point to item id list)、ITEMIDLIST(item id list)、SHITEMID(shell item id)。以上的item同层,如,文件夹中的文件、文件夹(,而非父、子级路径)。
    Namespace Extension接口IShellFolderIPersistFolderIShellViewIoleCommandTargetIShellBrowser
    IShellBrowser对应资源浏览器(而非IE浏览器),包含菜单栏、工具栏、状态栏的交互。

    文件上添加了笔记..

    Windows Shell NameSpace补充-文件夹位置_ljmwork的专栏-CSDN博客

    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionShell ExtensionsApproved
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorer
    Desktop、MyComputerControlPanelNameSpace
    虚拟文件夹下的虚拟文件可称为虚拟对象
    在注册表中称为子项

  • 相关阅读:
    .net持续集成cake篇之使用vs或者vscode来辅助开发cake脚本
    Redis集合类型
    Git如何合并Commit
    Redis列表类型
    Redis散列表类型
    Redis字符串类型
    2. 引用计数法(Reference Counting)
    调皮的控制台
    Python str与bytes之间的转换
    安全速查
  • 原文地址:https://www.cnblogs.com/RobertL/p/14775491.html
Copyright © 2011-2022 走看看