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

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

    Registering an Extension

    • WantsFORPARSING:

    The parsing name for an extension with a virtual junction point will normally have the form ::{GUID}
    virtual junction point = 虚拟文件夹
    相应的有virtual items(、file system objects)
    可能虚拟文件夹、文件系统文件夹同时存在。如My Document。
    request parsing name (= display name) by calling the folder object's IShellFolder::GetDisplayNameOf method.
    PIDL: pointer to an item identifier list.
    An empty PIDL contains only a terminator.

    • HideFolderVerbs:

    The verbs registered under HKEY_CLASSES_ROOTFolder normally are associated with all extensions.
    They appear on the extension's shortcutcontext) menu and can be invoked by ShellExecute.

    • HideAsDelete / HideAsDeletePerUser
    • QueryForOverlay
      icon can have an icon overlay.
    • the display name of the extension's junction point foldervirtual folder)。
      默认是parsing name(::{CLSID})。
      使用注册表键的default value
    • infotip
    • custom icon DefaultIcon
    • shortcut menu,复用(异地文件夹类HKEY_CLASSES_ROOTFolder,可定义本地项Create a Shellsubkey under the extension's CLSIDkey
      更深度的定制需implement a shortcut menu handler,create a ShellEx key under the extension's CLSID key。
    • add a page to the root folder's Properties property sheet。implement a property sheet handler,...
    • specify the attributes of the root folder。add a ShellFolder subkey to the extension's CLSID subkey。
    • The extension's root folder contains one or more items / subfolders.
    • junction points that are placed under one of the virtual folders (can delete)。

    Handling PIDLs

    Every item in the Shell namespace must have a unique PIDL.
    Windows Explorer assigns a PIDL to your root folder and passes the value to your extension. 后续子项是相对于根项
    root folder-extension-实例
    assign a properly constructed PIDL to each of its objects.(constructed 即后续的关于SHITEMID的ITEMIDLIST连续结构)
    uses a PIDL to identify one of your extension's objects。一对多?类似使用COM,除PIDL外,额外需条件以查找到具体对象。
    extension's objectsparticular object.
    Your extension must also assign a display name and a parsing name to each object.
    参考Office COM,一个,多个实例(而不论(文件系统中的)路径了)。
    此处Folder Object抽象的,不同于具象文件系统

    The term PIDL is short for an ITEMIDLIST structure..
    an ITEMIDLIST structure has a single member, an SHITEMID structure.
    a path through the namespace.
    路径是从子相对级联
    order of these structures。PIDL will consist of a series of SHITEMID structures。
    PIDL depends on the location of the object in the Shell namespace, and the starting point of the path.(偏移的
    Create an SHITEMID structure for each of its objects(实例)。(一对一
    Assemble the relevant SHITEMID structures into a PIDL

     Creating an SHITEMID Structure

    (An object's SHITEMID structure uniquely identifies) the object within its folder
    abID could points to an extension-defined (user-defined) structure, which could have: object's ID,related information(s), such as the object's type or attributes.。
    these structure: Persistable, Transportable.
    pointers or handles will normally be meaningless when the system later recovers them from storage.
    use either ANSI or Unicode characters explicitly, Avoid data types such as TCHAR or LPTSTR.

    在自定义abID成员中,可以使用/嵌入其他结构,结构中可以自定义成员以描述自身是文件、文件夹等。
    使用可辨识(唯一标识)的信息,如(唯一的)display name,相当于ID(没有要求有此具象字段)。

    Constructing a PIDL

    a single-level PIDL, identifies the object relative to its parent folder。
    A fully qualified PIDL defines a path through the (entire) namespace hierarchy from the desktop to the object.

    过程、例子。

    Interpreting PIDLs

    PIDLs that are relative to the parent folder and are straightforward to interpret(直接)。
    区分fully qualified PIDLs。
    可能绝对路径由多段命名空间组成,(末段是自己的)需解析找出属于自己部分。
    take the first cb value and add it to the address of the PIDL to advance the pointer to the start of the next SHITEMID structure

  • 相关阅读:
    23岁的这一年
    迁移ORACLE数据库文件到ASM
    无归档情况下使用BBED处理ORA-01113错误
    Oracle RMAN-06023 和ORA-19693错误
    手工创建Oracle数据库
    使用BBED理解和修改Oracle数据块
    Oracle 11g 重建EM需要删除的对象
    各大主流编程语言-常用爬虫框架以及优劣分析
    pyspider入门
    Centos7上安装docker及使用scrapy-splash
  • 原文地址:https://www.cnblogs.com/RobertL/p/14780331.html
Copyright © 2011-2022 走看看