SharpNativeDLL icon indicating copy to clipboard operation
SharpNativeDLL copied to clipboard

NativeAOT assisted native .NET DLL injection

SharpNativeDLL

NativeAOT assisted native .NET DLL injection

This is an example project to inject a NAOT compiled native .NET DLL. It implements a custom UnmanagedCallersOnly DllMain entrypoint which handles DLL_PROCESS_ATTACH protocol, and can be modified to further accept other protocols.

REQUIREMENTS: .NET 7

Limitations

The limitations for this particular implementation is outlined in the official documentation for NativeAOT

The most notable limitation is that it is bound to x64 and ARM64 architectures.

Screenshot