Search code examples
delphinaming-conventionspe-exports

'Exports' naming convention - how does it work?


What rules apply to the name that ends up in the exports section of an PE (Portable Executable)? Roughly, I see names starting with an '_' underscore, a '?' question mark or an '@' at-sign. What do those mean, and what about the rest of the name?

Also - How can I reverse the naming convention into something more usable?


Solution

  • I think you are refering to "dll name mangling"

    name mangling

    It's used to make sure exports names are unique

    You can specify a .def file which will make it easier to use afterwards

    Simply put, a .def file is just a text file containing the following structure

    LIBRARY "MyDll"
    
    EXPORTS
        exportFunction1