Vadim
Vadim

Reputation: 1241

Exporting function from DLL syntax

In export.def file one can put such lines:

LIBRARY plug
EXPORTS
    funcName
    main=funcName

What is the effect of exporting function in such a way? Does it export two function names, which belong to the same function? Or does it just exports function, giving it another name?

Upvotes: 0

Views: 345

Answers (1)

Seth Carnegie
Seth Carnegie

Reputation: 75130

According to MSDN:

The EXPORTS keyword can be on the same line as the first definition or on a preceding line. The .def file can contain one or more EXPORTS statements.

The syntax for export definitions is:

entryname[=internalname] [@ordinal [NONAME]] [PRIVATE] [DATA]

entryname is the function or variable name that you want to export. This is required. If the name you export is different from the name in the DLL, specify the export's name in the DLL with internalname. For example, if your DLL exports a function, func1() and you want it to be used as func2(), you would specify:

EXPORTS func2=func1

Upvotes: 2

Related Questions