Introducing SvcHostify: Simplify Hosting Custom DLL Services

Have you ever struggled with hosting your own DLLs as Windows services using svchost.exe? Many developers face challenges due to the undocumented and restrictive nature of svchost.exe. That’s where SvcHostify comes in—a lightweight, open-source tool designed to make hosting custom DLL services easier than ever.

Why SvcHostify?

SvcHostify eliminates the complexity of writing svchost-compatible services. Whether you’re coding in Java, C#, or C++, this tool handles the heavy lifting, letting you focus on your application logic. No more worries about C-style exports or system quirks.

  • Support for multiple languages: Build services in Java, C#, or C++ without worrying about low-level plumbing.
  • Two hosting modes:
    • SvcHost Mode: For academic/research purposes.
    • Standalone Mode: Run services using rundll32.exe—perfect for production.
  • Streamlined JSON configuration: Define service metadata, runtime behavior, and logging in one simple file.

What Can You Do with SvcHostify?

  • Host Java applications via JVM integration.
  • Run .NET DLLs as in-process COM servers.
  • Manage lightweight C++ services by exporting minimalistic C-style functions.

Features You’ll Love

  1. Effortless Service Management:
    Install and uninstall services in seconds with simple commands.
rundll32 svchostify.dll invoke -i -c <CONFIG_FILE>
rundll32 svchostify.dll invoke -u -c <CONFIG_FILE>

  1. Centralized Logging:
    Consolidates logs from stdout, stderr, and other streams into a single file, making debugging a breeze.
  2. Production-Ready Standalone Mode:
    Distribute your service easily without needing svchost.exe.
  3. Open Source Flexibility:
    Modify, enhance, and adapt SvcHostify for your unique use cases—licensed under MIT.

Sample Use Case: Hosting a Java Service

Here’s an example JSON configuration for running a Java-based service:

{
  "workerType": "jvm",
  "name": "MyJavaService",
  "displayName": "My Java Test Service",
  "context": "path/to/your/app.jar",
  "accountType": "networkService",
  "standalone": true,
  "logger": {
    "basePath": "logs/java.log",
    "maxSize": "10 MiB",
    "maxFiles": 5
  }
}

A few lines of JSON are all it takes to spin up your service!

Who Should Use SvcHostify?

  • Developers who need a quick way to deploy custom DLL services on Windows.
  • Organizations looking to simplify the deployment of internal tools and applications.
  • Hobbyists and researchers exploring the possibilities of Windows Service customization.

Get Started Today!

Visit the SvcHostify GitHub Repository to download the latest release, check out detailed documentation, and dive into sample projects.

Simplify your Windows Service development with SvcHostify—your next DLL-hosting project just got easier!