# Windows Dependencies

`FEX.Core.dll` ships alongside a small number of dependency DLLs. Three are
mandatory for the library to load; the rest are feature-gated and only
need to be present if you use the corresponding feature.

All of them are included in `bin/Win64/` in the SDK package — drop in only
the ones you need.

## Mandatory

These three DLLs must be present alongside `FEX.Core.dll`. Without them,
`FEX.Core.dll` fails to load at process start.

| DLL | Purpose |
|-----|---------|
| `FEX.Core.dll` | Main forensic processing library |
| `libcrypto-1_1-x64.dll` | OpenSSL 1.1 — image hashing and crypto primitives used throughout the DLL |
| `bzip2.dll` | bzip2 decompression for compressed E01 / Ex01 images |

## Optional (feature-gated)

These DLLs are only required if you use the corresponding feature. If a
DLL is absent, `FEX.Core.dll` still loads, but calls that exercise the
feature will fail.

| DLL | Feature it enables |
|-----|-------------------|
| `sqlite3_64.dll` | SQLite database parsing (browser history, app databases) |
| `libyara64.dll` | YARA pattern matching for file-type identification |
| `libpcre2-16.dll` | PCRE2 regular-expression search |
| `raptor2.dll` | RDF / Turtle parser used by AFF4 metadata |
| `zlib1.dll` | Zlib (gzip / deflate) decompression |
| `snappy.dll` | Snappy decompression |

## Deployment

### Option A: Same Directory (Recommended)

Place the DLLs you need in the same directory as your application
executable. This is the simplest and most reliable approach.

```
my-app/
├── my_app.exe              # Your application
├── FEX.Core.dll            # mandatory
├── libcrypto-1_1-x64.dll   # mandatory
├── bzip2.dll               # mandatory
└── ...                     # optional DLLs for features you use
```

### Option B: Python Projects

When using the Python SDK, the loader automatically searches for the DLL in standard locations relative to the SDK directory:

1. The `python/` directory itself
2. `Win64/Release/` relative to the SDK root
3. `Win64/Debug/` relative to the SDK root
4. `bin/Win64/` relative to the SDK root

You can also specify the DLL path explicitly:

```python
from core.loader import load_library
lib, path = load_library(lib_path=r"C:\path\to\FEX.Core.dll")
```

### Option C: System PATH

Add the DLL directory to your system PATH environment variable. Less portable but useful for development.

## Platform Requirements

- **Architecture:** x64 only (64-bit Python required)
- **OS:** Windows 10/11, Windows Server 2016+
- **Runtime:** Microsoft Visual C++ Runtime is typically pre-installed on modern Windows. If you encounter missing VCRUNTIME140.dll errors, install the [Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist).

## Notes

- **OpenSSL version:** FEX Core links against OpenSSL 1.1.x. The included `libcrypto-1_1-x64.dll` is self-contained and does not conflict with OpenSSL 3.x if installed system-wide.
- **No GUI dependencies:** FEX.Core.dll is a headless library with no GUI framework dependencies on Windows.
- **Thread safety:** All V2 API functions are thread-safe. Multiple threads can operate on different images concurrently.
