Export (0) Print
Expand All

What optimization techniques should I use to improve the client application's performance when loading?

If your DLL is a regular DLL that is statically linked to MFC, changing it to a regular DLL that is dynamically linked to MFC will reduce the file size. For more information, see Which Kind of DLL to Use.

If the DLL has a large number of exported functions, use a .DEF file to export the functions (instead of using __declspec(dllexport)) and use the .DEF file NONAME attribute on each exported function. The NONAME attribute causes only the ordinal value and not the function name to be stored in the DLL's export table, which reduces the file size.

DLLs that are implicitly linked to an application are loaded when the application loads. To improve the performance when loading, try dividing the DLL into different DLLs. Put all of the functions that the calling application needs immediately after loading into one DLL and have the calling application implicitly link to that DLL. Put the other functions that the calling application does not need right away into another DLL and have the application explicitly link to that DLL. For more information, see Determining Which Linking Method to Use.

See Also

DLL Frequently Asked Questions

Show:
© 2014 Microsoft