# apphhzp/apphhzplib-dll architecture

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

- Interactive diagram: https://gitdiagram.com/apphhzp/apphhzplib-dll
- Repository: https://github.com/apphhzp/apphhzplib-dll

## Overview

EntityEraser is a Windows native DLL exposing JNI entry points for Java-side window utilities, JVM instrumentation, object inspection, and thread execution. Its main workflow is a Java native call crossing the JNI boundary into Windows or JVMTI operations; instrumentation also initializes agent capabilities and handles class-file transformation. The excerpts show these native responsibilities, but the README is empty and Java callers are not in this tree, so the graph does not infer Java-side sequencing.

Main entry points: [`EntityEraser/EntityEraser.cpp`](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp) (JNI Native Entry Points)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bridge["JNI and Windows"]
  node_jni["JNI Native Entry Points<br/>[EntityEraser.cpp]"]
  node_window["Window Messaging<br/>[EntityEraser.cpp]"]
  node_thread["Detached Thread Runner<br/>[EntityEraser.cpp]"]
end

subgraph group_instrumentation["JVM Instrumentation"]
  node_agent["Instrumentation Agent Setup<br/>[EntityEraser.cpp]"]
  node_transform["Class Transformation<br/>[EntityEraser.cpp]"]
end

subgraph group_objects["Object Inspection"]
  node_objecthooks["Object Event Hooks<br/>[EntityEraser.cpp]"]
  node_objectquery["Object Queries<br/>[EntityEraser.cpp]"]
end

node_java(("Java NativeUtil"))
node_windows["Windows API"]
node_jvmti["JVM and JVMTI"]

node_java -->|"calls JNI"| node_jni
node_jni -->|"dispatches"| node_window
node_window -->|"posts messages"| node_windows
node_window -->|"gets active window"| node_windows
node_jni -->|"creates instrumentation"| node_agent
node_agent -->|"configures capabilities"| node_jvmti
node_transform -->|"transforms class"| node_transform
node_jni -->|"creates object hooks"| node_objecthooks
node_objecthooks -->|"registers hooks"| node_jvmti
node_jni -->|"queries objects"| node_objectquery
node_objectquery -->|"reads tagged objects"| node_jvmti
node_jni -->|"starts worker"| node_thread

click node_jni "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp"
click node_window "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp"
click node_agent "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp"
click node_transform "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp"
click node_objecthooks "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp"
click node_objectquery "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp"
click node_thread "https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.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_jni,node_window,node_thread toneBlue
class node_agent,node_transform toneAmber
class node_objecthooks,node_objectquery,node_windows toneMint
class node_java,node_jvmti toneIndigo
```

## Components

### JNI and Windows

- [JNI Native Entry Points](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`
- [Window Messaging](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`
- [Detached Thread Runner](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`

### JVM Instrumentation

- [Instrumentation Agent Setup](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`
- [Class Transformation](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`

### Object Inspection

- [Object Event Hooks](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`
- [Object Queries](https://github.com/apphhzp/apphhzplib-dll/blob/master/EntityEraser/EntityEraser.cpp): `EntityEraser/EntityEraser.cpp`

### Other components

- **Java NativeUtil**
- **Windows API**
- **JVM and JVMTI**

## Connections

- Java NativeUtil → JNI Native Entry Points: calls JNI (evidence: `EntityEraser/EntityEraser.cpp`)
- JNI Native Entry Points → Window Messaging: dispatches (evidence: `EntityEraser/EntityEraser.cpp`)
- Window Messaging → Windows API: posts messages (evidence: `EntityEraser/EntityEraser.cpp`)
- Window Messaging → Windows API: gets active window (evidence: `EntityEraser/EntityEraser.cpp`)
- JNI Native Entry Points → Instrumentation Agent Setup: creates instrumentation (evidence: `EntityEraser/EntityEraser.cpp`)
- Instrumentation Agent Setup → JVM and JVMTI: configures capabilities (evidence: `EntityEraser/EntityEraser.cpp`)
- Class Transformation → Class Transformation: transforms class (evidence: `EntityEraser/EntityEraser.cpp`)
- JNI Native Entry Points → Object Event Hooks: creates object hooks (evidence: `EntityEraser/EntityEraser.cpp`)
- Object Event Hooks → JVM and JVMTI: registers hooks (evidence: `EntityEraser/EntityEraser.cpp`)
- JNI Native Entry Points → Object Queries: queries objects (evidence: `EntityEraser/EntityEraser.cpp`)
- Object Queries → JVM and JVMTI: reads tagged objects (evidence: `EntityEraser/EntityEraser.cpp`)
- JNI Native Entry Points → Detached Thread Runner: starts worker (evidence: `EntityEraser/EntityEraser.cpp`)
