QuickDllProxy
A header-only DLL proxy stub generation library built with C++20.
Install / Use
/learn @Nukem9/QuickDllProxyREADME
QuickDllProxy
A header-only DLL proxy stub generation library built with C++20. No more copy-pasting 100s of DLL exports. No more guessing function parameters.
This project attempts to emulate delayed imports in reverse, i.e. delayed exports. For a somewhat detailed breakdown please read DllProxy.h's header comments or check out the implementation.
Configuration
#define DLL_PROXY_EXPORT_LISTING_FILE "ExportListing.inc"
// Required setting to define the list of proxied exports for this library.
#define DLL_PROXY_TLS_CALLBACK_AUTOINIT
// Optional setting to automatically generate a TLS callback that runs DllProxy::Initialize.
#define DLL_PROXY_CHECK_MISSING_EXPORTS
// Optional setting to enforce that all real exports are found during DllProxy::Initialize. If disabled,
// unresolved export errors will be deferred until proxy functions are invoked.
#define DLL_PROXY_LIBRARY_RESOLVER_CALLBACK MyExampleLibraryResolver
// Optional setting to define a custom function that resolves a DLL's HMODULE. Signature identical to
// DllProxy::DefaultLibraryResolverCallback.
#define DLL_PROXY_EXPORT_RESOLVER_CALLBACK MyExampleExportResolver
// Optional setting to define a custom function that resolves a DLL's exported function. Signature identical to
// DllProxy::DefaultExportResolverCallback.
#define DLL_PROXY_EXCEPTION_CALLBACK MyExampleExceptionCallback
// Optional setting to define a custom function that's invoked on error. Signature identical to
// DllProxy::DefaultExceptionCallback.
Example Usage
// MySpecialDllFile.cpp
#define DLL_PROXY_EXPORT_LISTING_FILE "ExportListing.inc" // List of exported functions
#define DLL_PROXY_TLS_CALLBACK_AUTOINIT // Enable automatic initialization TLS callback
#define DLL_PROXY_DECLARE_IMPLEMENTATION // Define the whole implementation
#include <QuickDllProxy/DllProxy.h>
// ExportListing.inc
DECLARE_PROXIED_LIBRARY("winhttp.dll")
DECLARE_PROXIED_API_ORDINAL("WinHttpAddRequestHeaders", 6)
DECLARE_PROXIED_API_ORDINAL("WinHttpSetSecureLegacyServersAppCompat", 1)
DECLARE_PROXIED_API("TestFunction_1110")
Demo Projects
Known Limitations
- Exported global variables aren't supported.
- Original exports are resolved at runtime within a TLS callback or DllMain(). In rare cases this is too late to be useful.
- Control flow guard targets aren't valid until after original export resolution.
License
Related Skills
node-connect
340.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.1kCommit, push, and open a PR
