In addition to what others have explained in the header / LIB file, there is another perspective.
In any case, the client will be able to reconstruct the DLL using basic tools such as Dependency Walker to find out which DLLs your DLL uses, which functions your DLL uses (for example, some functions from AdvApi32.DLL).
If you want your DLL to be hidden , your DLL should:
- Load all custom DLLs dynamically (and if this is not possible, do the following anyway)
GetProcAddress call for all functions that you want to call ( GetProcessToken from ADVAPI32.DLL for example
Thus, at least the dependency host (without tracing) will not be able to find which functions (or DLLs) are used. You can load the functions of the system DLL by sequence numbers rather than by name, so it is more difficult to reverse engineer a text search in a DLL.
Debuggers can still debug your DLL (among other tools) and rebuild it. You need to find methods to prevent DLL debugging. For example, the simplest API is IsDebuggerPresent . Other advanced approaches are available.
Why did I say all this? Well, if you intend not to supply the header / DLL, the client will still be able to find the exported functions and will use it. You, as a DLL provider, must also provide it with programming elements. If you have to hide, then completely hide.
source share