# echoview2/echoviewshellex architecture

> Architecture diagram of the GitHub repository echoview2/echoviewshellex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/echoview2/echoviewshellex
- Repository: https://github.com/echoview2/echoviewshellex

## Overview

##### Project type and purpose
- This is a suite of Windows Explorer Shell Extensions written in native C++ (no .NET).
- It provides three COM in-proc servers for file operations:
– GpShx: “Get Path” context-menu extension
– DffShx: “Date-prefixed Folder/File” creator
– UpdateShx: “Update Date” file rename/inserter
- There is also a Visual Studio installer project (EchoviewShellEx) and shared “common” code.

##### File structure
- Top-level solution file (EchoviewShellEx.sln) ties together four VS projects:
– common (static/shared library)
– GpShx (DLL)
– DffShx (DLL)
– UpdateShx (DLL)
– EchoviewShellEx (installer .vdproj + registry .reg)
- Each extension project follows the same pattern: .cpp/.h for entry, factory, interface, DLL export (.def), .vcxproj.
- .github/workflows contains CI definitions (msbuild, create-release).

##### Key insights from README
- Extensions implement standard COM interfaces for Shell context menus.
- They leverage Shell API to allow Undo, selection, drag/drop.
- Development evolved across decades: 32→64-bit, compiler updates, registry-driven customization.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Runtime Flow
    subgraph "Runtime Flow"
        Explorer["explorer.exe (Host Process)"]:::process
        COM["COM Runtime (ole32.dll)"]:::process
        Registry["Registry (HKEY_CURRENT_USER)"]:::registry
        Common["common.lib (Static Library)"]:::common
        GpShx["GpShx.dll (Get Path)"]:::dll
        DffShx["DffShx.dll (Create-Date Folder)"]:::dll
        UpdateShx["UpdateShx.dll (Update Date)"]:::dll
    end

    Explorer -->|"CoCreateInstance"| COM
    COM -->|"Load DLL Entry Point"| GpShx
    COM -->|"Load DLL Entry Point"| DffShx
    COM -->|"Load DLL Entry Point"| UpdateShx
    GpShx -->|"Link (common.lib)"| Common
    DffShx -->|"Link (common.lib)"| Common
    UpdateShx -->|"Link (common.lib)"| Common
    GpShx -->|"ReadRegistry"| Registry
    DffShx -->|"ReadRegistry"| Registry
    UpdateShx -->|"ReadRegistry"| Registry

    %% Build & Deployment
    subgraph "Build & Deployment"
        Solution["EchoviewShellEx.sln"]:::code
        GitHub["GitHub Actions"]:::ci
        Build["MSBuild"]:::process
        Artifacts["Artifacts (DLLs & Installer)"]:::storage
        Installer["Installer (vdproj)"]:::installer
        RegistryDeploy[".reg Registry Entries"]:::registry
    end

    Solution --> GitHub
    GitHub --> Build
    Build --> Artifacts
    Artifacts --> Installer
    Installer --> RegistryDeploy
    RegistryDeploy --> Registry

    %% Click Events
    click Common "https://github.com/echoview2/echoviewshellex/blob/main/common/common.vcxproj"
    click Common "https://github.com/echoview2/echoviewshellex/blob/main/common/ComPtr.h"
    click Common "https://github.com/echoview2/echoviewshellex/blob/main/common/RegTools.cpp"
    click Common "https://github.com/echoview2/echoviewshellex/blob/main/common/ShxTools.cpp"
    click GpShx "https://github.com/echoview2/echoviewshellex/blob/main/GpShx/GpShx.vcxproj"
    click GpShx "https://github.com/echoview2/echoviewshellex/blob/main/GpShx/GpShx.cpp"
    click GpShx "https://github.com/echoview2/echoviewshellex/blob/main/GpShx/GpShxDLLEntry.cpp"
    click GpShx "https://github.com/echoview2/echoviewshellex/blob/main/GpShx/GpShxFactory.cpp"
    click DffShx "https://github.com/echoview2/echoviewshellex/blob/main/DffShx/DffShx.vcxproj"
    click DffShx "https://github.com/echoview2/echoviewshellex/blob/main/DffShx/DffShx.cpp"
    click DffShx "https://github.com/echoview2/echoviewshellex/blob/main/DffShx/DffShxDLLEntry.cpp"
    click DffShx "https://github.com/echoview2/echoviewshellex/blob/main/DffShx/DffShxFactory.cpp"
    click UpdateShx "https://github.com/echoview2/echoviewshellex/blob/main/UpdateShx/UpdateShx.vcxproj"
    click UpdateShx "https://github.com/echoview2/echoviewshellex/blob/main/UpdateShx/UpdateShx.cpp"
    click Installer "https://github.com/echoview2/echoviewshellex/blob/main/EchoviewShellEx/EchoviewShellEx.vdproj"
    click Installer "https://github.com/echoview2/echoviewshellex/blob/main/EchoviewShellEx/DffShx-HKEY_CURRENT_USER.reg"
    click Installer "https://github.com/echoview2/echoviewshellex/blob/main/EchoviewShellEx/UpdateShx-HKEY_CURRENT_USER.reg"
    click Solution "https://github.com/echoview2/echoviewshellex/blob/main/EchoviewShellEx.sln"
    click GitHub "https://github.com/echoview2/echoviewshellex/blob/main/.github/workflows/msbuild.yml"
    click GitHub "https://github.com/echoview2/echoviewshellex/blob/main/.github/workflows/create-release.yml"
    click Artifacts "https://github.com/echoview2/echoviewshellex/tree/main/images/"

    %% Styles
    classDef process fill:#cccccc,stroke:#333333
    classDef dll fill:#b3d9ff,stroke:#003366
    classDef registry fill:#ccffcc,stroke:#336633,stroke-width:2px
    classDef common fill:#f2f2f2,stroke:#999999,stroke-dasharray:5 5
    classDef ci fill:#ffcc99,stroke:#cc6600
    classDef code fill:#ffffcc,stroke:#cccc00
    classDef storage fill:#ffebcc,stroke:#cc8400
    classDef installer fill:#e6e6e6,stroke:#666666
```
