Export from a DLL
| Overview | How Do I | FAQ | Details | Sample
A .DLL file has a layout very similar to an .EXE file, with one important difference ? a DLL file contains an exports table. The exports table contains the name of every function that the DLL exports to other executables. These functions are the entry points into the DLL; only the functions in the exports table can be accessed by other executables. Any other functions in the DLL are private to the DLL. The exports table of a DLL can be viewed by using the tool DUMPBIN with the /EXPORTS switch.
You can export functions from a DLL with two methods:
Create a module definition (.DEF) file and use the .DEF file when building the DLL. (Use this approach if you want to export functions from your DLL by ordinal rather than by name.)
Use the keyword __declspec(dllexport) in the function’s definition.
When exporting functions with either method, make sure to use the __stdcall calling convention.
What do you want to do?
Prepare the MFC DLL for use by an application, or Prepare the Win32 DLL for use by an application