The export command

The export command has the form:

export entryname [=internalname] [@ordinal [noname]] [data]

Only a shortened version of the command is available in command line mode, namely:

-export:entryname [=internalname]

internalname is the name of the symbol as it appears in your program or object files. Note that, in the case of _ _stdcall functions, there is an additional "decoration" added to the end of the symbol. In general, you should not use this decoration nor the leading underscore added to the symbol name. SLINK will match the undecorated name specified with the decorated name in the loaded object files. In the case of Silverfrost C++ decorations, the full decorated name should be specified but without the leading underscore.

entryname is the name of the symbol by which the user would call your function. SLINK will append a leading underscore and transfer any _ _stdcall decoration found for the internalname to the entryname. The name of the function will appear in the DLL export table exactly specified with this command.

In the following example, suppose your _ _stdcall function func exists with the full decorated name _func@12

export gloop=func

SLINK will match func with _func@12 and also export _func@12. The name appearing in the export list will be gloop and the symbol appearing in the import library (if any) will be _gloop@12.

The name in the export table and the name in the calling program's import table are identical. This is so that the system loader is able to find the function in the DLL.

data is used to export a data item. You must use a pointer to the data item in your program. See the command reference for descriptions of ordinals and the noname keyword.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited