How can a DLL have zero export?

I recently stumbled upon a DLL installed on my system that Dependancy Walker (and any other utility I tried) says it has zero export by name or order, but the file size is approximately 4 MB. I thought the sole purpose of a DLL was to export functions for use by other code, so what would be the purpose of a DLL without visible export?

+6
dll dllexport
source share
2 answers

One way to think of a DLL is to use a container for functions. Exporting a function from a DLL makes these functions visible to callers outside the DLL. Although exporting functions from a DLL is perhaps the most common way to provide access to them, many platforms provide other ways to access functions that have not been exported, such as reflection in the .NET Framework and Java and (I think) LoadLibtary / GetProcAddress in Win32

The reasons for this vary, often due to the fact that it is useful for the developer to have functions in the library, but it is undesirable for those functions that will be called from external applications

+4
source share

Resource DLL maybe? For example, they are used quite often for localization purposes.

EDIT: It is also possible to have a DLL with code that does something in DllMain () to somehow make its functionality available. A DLL can register itself with some kind of global dispatcher, for example, or create named kernel objects ...

+3
source share

All Articles