If I export functions in a DLL, is there a limit on the length of the function names?
Asked
Active
Viewed 2,049 times
1 Answers
4
When using a Microsoft compiler, the function name of an exported C++ class has a limit of 4096. It is explained here.
From experiments, it is found that for a C exported function also have the same limitation.

MNS
- 1,354
- 15
- 26
-
What about the maximum functions which can be exposed in DLL? – Royi Feb 17 '18 at 12:33
-
@Royi I couldn't find any documented reference to answer your question. But when we look at the `IMAGE_EXPORT_DIRECTORY` section inside a Windows Portable Executable (Win PE) format, the `NumberOfFunctions` member variable (which represents maximum functions exported) is having a type `uint32_t`. So it is quite possible that number of exported functions can come up to 2^32. – MNS Feb 18 '18 at 05:43
-
@PetrKozelka : Most of the old msdn links seem to be obsolete now. I found [this](https://msdn.microsoft.com/en-us/library/074af4b6.aspx) link that mentions a 4096 limitation for a decorated name. This compiler limitation holds true for an exported function name too. – MNS Sep 18 '18 at 05:38