WinHex OpenMemory shows my secret dll module which i don't want to revealed

Viewed 56

I developed a C# (.NET Core 5) app which uses an C++ unmanaged dll , C++ unmanaged dll uses another dll (sub module) which loaded into memory at runitme.

I tried to unload or hide that second dll from the memory ( With FreeLibrary function ) , but i failed. WinHex always show which dll my app is using and for me that's the problem.

Notes :

I can easily get the second dll (sub module) handle with GetModuleHandle , but it won't unloaded from the memory with FreeLibrary.

MyApp -----> Main Dll ( unamanged ) -----> Sub dll ( unmanaged )

I need to force unload the Sub dll which i'm sure the Main Dll not using it but just load it at runtime.

The sub dll is not loaded with LoadLibrary , it statically imported from the import tbale.

Thanks

0 Answers
Related