# jacan/wmi architecture

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

- Interactive diagram: https://gitdiagram.com/jacan/wmi
- Repository: https://github.com/jacan/wmi

## Overview

JCK.WMI is a C++/CLR wrapper for querying Windows Management Instrumentation (WMI). Its principal workflow is to configure machine targets and WQL queries, execute those queries against target machines, parse returned CIM XML into instances and typed values, and return results grouped by machine. The graph also includes the parameter and thread-parameter modules named as core modules, though their runtime roles are not established by the excerpts. Evidence is limited to the README and sampled source; uncertain entry-point and helper relationships are omitted or marked unverified.

Main entry points: [`JCK.WMI/QueryManager.cpp`](https://github.com/jacan/wmi/blob/master/JCK.WMI/QueryManager.cpp) (Query Manager), [`JCK.WMI/WMIQuery.cpp`](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIQuery.cpp) (WQL Query), [`JCK.WMI/WMInstance.cpp`](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMInstance.cpp) (WMI Instance), [`JCK.WMI/MachineTarget.cpp`](https://github.com/jacan/wmi/blob/master/JCK.WMI/MachineTarget.cpp) (Machine Target)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Target Coordination"]
  node_manager["Query Manager<br/>[QueryManager.cpp]"]
  node_target["Machine Target<br/>[MachineTarget.cpp]"]
end

subgraph group_execution["WMI Execution"]
  node_query["WQL Query<br/>[WMIQuery.cpp]"]
  node_parameter["WMI Parameter<br/>[WMIParameter.cpp]"]
  node_threadparm["Thread Parameters<br/>[WMIThreadParm.cpp]"]
end

subgraph group_results["Result Modeling"]
  node_resultset["Machine Results<br/>[WMIResultSet.cpp]"]
  node_instance["WMI Instance<br/>[WMInstance.cpp]"]
  node_value["Property Value<br/>[WMIValue.cpp]"]
  node_intrinsic["Intrinsic Types<br/>[IntrinsicType.h]"]
end

node_client(("Library Client"))
node_wmi["WMI Service"]

node_client -.->|"uses"| node_manager
node_manager -->|"iterates"| node_target
node_manager -->|"executes"| node_query
node_manager -->|"broadcasts queries"| node_query
node_target -->|"configures"| node_query
node_query -->|"queries"| node_wmi
node_query -->|"creates instances"| node_instance
node_manager -->|"builds results"| node_resultset
node_resultset -->|"stores"| node_instance
node_instance -->|"parses properties"| node_value
node_value -->|"parses type"| node_intrinsic

click node_manager "https://github.com/jacan/wmi/blob/master/JCK.WMI/QueryManager.cpp"
click node_target "https://github.com/jacan/wmi/blob/master/JCK.WMI/MachineTarget.cpp"
click node_query "https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIQuery.cpp"
click node_resultset "https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIResultSet.cpp"
click node_instance "https://github.com/jacan/wmi/blob/master/JCK.WMI/WMInstance.cpp"
click node_value "https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIValue.cpp"
click node_intrinsic "https://github.com/jacan/wmi/blob/master/JCK.WMI/IntrinsicType.h"
click node_parameter "https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIParameter.cpp"
click node_threadparm "https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIThreadParm.cpp"

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_manager,node_target,node_client toneBlue
class node_query,node_parameter,node_threadparm toneAmber
class node_resultset,node_instance,node_value,node_intrinsic toneMint
class node_wmi toneIndigo
```

## Components

### Target Coordination

- [Query Manager](https://github.com/jacan/wmi/blob/master/JCK.WMI/QueryManager.cpp): `JCK.WMI/QueryManager.cpp`
- [Machine Target](https://github.com/jacan/wmi/blob/master/JCK.WMI/MachineTarget.cpp): `JCK.WMI/MachineTarget.cpp`

### WMI Execution

- [WQL Query](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIQuery.cpp): `JCK.WMI/WMIQuery.cpp`
- [WMI Parameter](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIParameter.cpp): `JCK.WMI/WMIParameter.cpp`
- [Thread Parameters](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIThreadParm.cpp): `JCK.WMI/WMIThreadParm.cpp`

### Result Modeling

- [Machine Results](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIResultSet.cpp): `JCK.WMI/WMIResultSet.cpp`
- [WMI Instance](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMInstance.cpp): `JCK.WMI/WMInstance.cpp`
- [Property Value](https://github.com/jacan/wmi/blob/master/JCK.WMI/WMIValue.cpp): `JCK.WMI/WMIValue.cpp`
- [Intrinsic Types](https://github.com/jacan/wmi/blob/master/JCK.WMI/IntrinsicType.h): `JCK.WMI/IntrinsicType.h`

### Other components

- **Library Client**
- **WMI Service**

## Connections

- Library Client → Query Manager: uses
- Query Manager → Machine Target: iterates (evidence: `JCK.WMI/QueryManager.cpp`)
- Query Manager → WQL Query: executes (evidence: `JCK.WMI/QueryManager.cpp`)
- Query Manager → WQL Query: broadcasts queries (evidence: `JCK.WMI/QueryManager.cpp`)
- Machine Target → WQL Query: configures (evidence: `JCK.WMI/MachineTarget.cpp`)
- WQL Query → WMI Service: queries (evidence: `JCK.WMI/WMIQuery.cpp`)
- WQL Query → WMI Instance: creates instances (evidence: `JCK.WMI/WMIQuery.cpp`)
- Query Manager → Machine Results: builds results (evidence: `JCK.WMI/QueryManager.cpp`)
- Machine Results → WMI Instance: stores
- WMI Instance → Property Value: parses properties (evidence: `JCK.WMI/WMInstance.cpp`)
- Property Value → Intrinsic Types: parses type (evidence: `JCK.WMI/WMIValue.cpp`)
