export.md

October 10, 2024 ยท View on GitHub

Asmc Linker Reference

/EXPORT

/EXPORT:entryname[,@ordinal[,NONAME]][,DATA]

The /EXPORT option specifies a function or data item to export from your program so that other programs can call the function or use the data. Exports are usually defined in a DLL.

The entryname is the name of the function or data item as it is to be used by the calling program. ordinal specifies an index into the exports table in the range 1 through 65,535; if you do not specify ordinal, LINKW assigns one. The NONAME keyword exports the function only as an ordinal, without an entryname.

There are four methods for exporting a definition, listed in recommended order of use:

  • EXPORT in the source code
  • An EXPORTS statement in a .def file
  • An /EXPORT specification in a LINKW command
  • A comment directive in the source code, of the form .pragma comment(linker, "/export: definition ").

See Also

Asmc Linker Reference