# hiyohiyo/crystaldiskinfo architecture

> Architecture diagram of the GitHub repository hiyohiyo/crystaldiskinfo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hiyohiyo/crystaldiskinfo
- Repository: https://github.com/hiyohiyo/crystaldiskinfo

## Overview

CrystalDiskInfo is a Windows disk-information application. The principal workflow is to discover storage devices, obtain and interpret SMART/device data, then present drive health and details in the main window; users can also open graphs and configuration or status dialogs. The README documents support across several drive and controller types, including partial support for USB, RAID, and NVMe. The graph retains those product capabilities, but sampled source does not establish their runtime dispatch paths, so those links are marked unverified. The supplied excerpts are incomplete.

Main entry points: [`DiskInfoDlg.cpp`](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfoDlg.cpp) (Main window), [`AtaSmart.cpp`](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp) (SMART acquisition), [`DiskInfo.cpp`](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfo.cpp) (Application setup), [`JMicronUsbRaidInit.h`](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/JMicronUsbRaidInit.h) (JMicron USB RAID)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Device acquisition"]
  node_smart["SMART acquisition<br/>[AtaSmart.cpp]"]
  node_smartmodel["SMART data model<br/>[AtaSmart.h]"]
  node_storage[("Storage devices")]
  node_ata["PATA / SATA<br/>[AtaSmart.cpp]"]
  node_usb["USB drives<br/>[AtaSmart.cpp]"]
  node_raid["RAID controllers<br/>[AtaSmart.cpp]"]
  node_jmicron["JMicron USB RAID"]
  node_jmicrond["JMicron RAID definitions"]
  node_nvme["NVMe drives"]
end

subgraph group_presentation["Drive interface"]
  node_main["Main window<br/>[DiskInfoDlg.cpp]"]
  node_app["Application setup<br/>[DiskInfo.cpp]"]
  node_resources["Application resources<br/>[DiskInfo.h]"]
end

subgraph group_features["Product features"]
  node_graph["Drive graphs<br/>[GraphDlg.cpp]"]
  node_graphmodel["Graph data interface<br/>[GraphDlg.h]"]
  node_health["Health status<br/>[HealthDlg.cpp]"]
  node_temperature["Temperature view<br/>[TemperatureDlg.cpp]"]
  node_options["Options<br/>[OptionDlg.cpp]"]
  node_settings["Settings<br/>[SettingDlg.cpp]"]
  node_events["Event logging<br/>[EventLog.cpp]"]
end

subgraph group_internal["Shared internals"]
  node_dialogfx["Dialog framework<br/>[DialogFx.h]"]
  node_mainfx["Main-window framework<br/>[MainDialogFx.h]"]
  node_images["Image utilities<br/>[ImageFx.h]"]
  node_osinfo["OS information<br/>[OsInfoFx.h]"]
  node_utility["Shared utilities<br/>[UtilityFx.h]"]
  node_qr["QR generation<br/>[qrcodegen.cpp]"]
  node_pch["Shared declarations<br/>[stdafx.h]"]
end

node_user(("User"))
node_windows["Windows device APIs"]

node_user -.->|"uses"| node_main
node_app -.->|"starts"| node_main
node_main -.->|"requests data"| node_smart
node_smart -.->|"queries"| node_windows
node_windows -.->|"enumerates"| node_storage
node_smart -.->|"fills"| node_smartmodel
node_smart -.->|"supports"| node_ata
node_smart -.->|"supports partly"| node_usb
node_smart -.->|"supports partly"| node_raid
node_smart -.->|"supports partly"| node_nvme
node_smart -.->|"supports"| node_jmicron
node_jmicron -.->|"uses definitions"| node_jmicrond
node_main -.->|"opens"| node_graph
node_graph -.->|"uses"| node_graphmodel
node_main -.->|"opens"| node_health
node_main -.->|"opens"| node_temperature
node_main -.->|"opens"| node_options
node_main -.->|"opens"| node_settings
node_main -.->|"records"| node_events
node_main -.->|"uses"| node_dialogfx
node_main -.->|"uses"| node_mainfx
node_main -.->|"uses"| node_osinfo
node_main -.->|"uses"| node_utility
node_app -.->|"configures"| node_resources
node_main -.->|"uses"| node_images
node_main -.->|"uses"| node_qr
node_smart -.->|"uses"| node_utility
node_main -.->|"includes"| node_pch

click node_main "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfoDlg.cpp"
click node_app "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfo.cpp"
click node_smart "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp"
click node_smartmodel "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.h"
click node_ata "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp"
click node_usb "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp"
click node_raid "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp"
click node_jmicron "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/JMicronUsbRaidInit.h"
click node_jmicrond "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/JMicronUsbRaidDef.h"
click node_nvme "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/NVMeInterpreter.cpp"
click node_graph "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/GraphDlg.cpp"
click node_graphmodel "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/GraphDlg.h"
click node_health "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/HealthDlg.cpp"
click node_temperature "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/TemperatureDlg.cpp"
click node_options "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/OptionDlg.cpp"
click node_settings "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/SettingDlg.cpp"
click node_events "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/EventLog.cpp"
click node_dialogfx "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/DialogFx.h"
click node_mainfx "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/MainDialogFx.h"
click node_images "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/ImageFx.h"
click node_osinfo "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/OsInfoFx.h"
click node_utility "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/UtilityFx.h"
click node_qr "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/qrcodegen.cpp"
click node_resources "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfo.h"
click node_pch "https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Library/stdafx.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_smart,node_smartmodel,node_storage,node_ata,node_usb,node_raid,node_jmicron,node_jmicrond,node_nvme,node_user toneBlue
class node_main,node_app,node_resources toneAmber
class node_graph,node_graphmodel,node_health,node_temperature,node_options,node_settings,node_events,node_windows toneMint
class node_dialogfx,node_mainfx,node_images,node_osinfo,node_utility,node_qr,node_pch toneRose
```

## Components

### Device acquisition

- [SMART acquisition](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp): `AtaSmart.cpp`
- [SMART data model](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.h): `AtaSmart.h`
- **Storage devices**
- [PATA / SATA](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp): `AtaSmart.cpp`
- [USB drives](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp): `AtaSmart.cpp`
- [RAID controllers](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/AtaSmart.cpp): `AtaSmart.cpp`
- [JMicron USB RAID](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/JMicronUsbRaidInit.h): `JMicronUsbRaidInit.h`
- [JMicron RAID definitions](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/JMicronUsbRaidDef.h): `JMicronUsbRaidDef.h`
- [NVMe drives](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/NVMeInterpreter.cpp): `NVMeInterpreter.cpp`

### Drive interface

- [Main window](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfoDlg.cpp): `DiskInfoDlg.cpp`
- [Application setup](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfo.cpp): `DiskInfo.cpp`
- [Application resources](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/DiskInfo.h): `DiskInfo.h`

### Product features

- [Drive graphs](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/GraphDlg.cpp): `GraphDlg.cpp`
- [Graph data interface](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/GraphDlg.h): `GraphDlg.h`
- [Health status](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/HealthDlg.cpp): `HealthDlg.cpp`
- [Temperature view](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/TemperatureDlg.cpp): `TemperatureDlg.cpp`
- [Options](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/OptionDlg.cpp): `OptionDlg.cpp`
- [Settings](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/SettingDlg.cpp): `SettingDlg.cpp`
- [Event logging](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/EventLog.cpp): `EventLog.cpp`

### Shared internals

- [Dialog framework](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/DialogFx.h): `Priscilla/DialogFx.h`
- [Main-window framework](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/MainDialogFx.h): `Priscilla/MainDialogFx.h`
- [Image utilities](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/ImageFx.h): `Priscilla/ImageFx.h`
- [OS information](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/OsInfoFx.h): `Priscilla/OsInfoFx.h`
- [Shared utilities](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Priscilla/UtilityFx.h): `Priscilla/UtilityFx.h`
- [QR generation](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/qrcodegen.cpp): `qrcodegen.cpp`
- [Shared declarations](https://github.com/hiyohiyo/crystaldiskinfo/blob/master/Library/stdafx.h): `Library/stdafx.h`

### Other components

- **User**
- **Windows device APIs**

## Connections

- User → Main window: uses
- Application setup → Main window: starts
- Main window → SMART acquisition: requests data
- SMART acquisition → Windows device APIs: queries
- Windows device APIs → Storage devices: enumerates
- SMART acquisition → SMART data model: fills (evidence: `AtaSmart.cpp`)
- SMART acquisition → PATA / SATA: supports (evidence: `README.md`)
- SMART acquisition → USB drives: supports partly (evidence: `README.md`)
- SMART acquisition → RAID controllers: supports partly (evidence: `README.md`)
- SMART acquisition → NVMe drives: supports partly (evidence: `README.md`)
- SMART acquisition → JMicron USB RAID: supports (evidence: `README.md`)
- JMicron USB RAID → JMicron RAID definitions: uses definitions
- Main window → Drive graphs: opens
- Drive graphs → Graph data interface: uses (evidence: `GraphDlg.cpp`)
- Main window → Health status: opens
- Main window → Temperature view: opens
- Main window → Options: opens
- Main window → Settings: opens
- Main window → Event logging: records
- Main window → Dialog framework: uses
- Main window → Main-window framework: uses
- Main window → OS information: uses (evidence: `DiskInfoDlg.cpp`)
- Main window → Shared utilities: uses (evidence: `DiskInfoDlg.cpp`)
- Application setup → Application resources: configures (evidence: `DiskInfo.h`)
- Main window → Image utilities: uses
- Main window → QR generation: uses
- SMART acquisition → Shared utilities: uses (evidence: `AtaSmart.cpp`)
- Main window → Shared declarations: includes (evidence: `DiskInfoDlg.cpp`)
