[Main]
Name=DLL_EXPORTS
Type=Language Extension
Header Files=dll.h
Real Definition=#define DLL_EXPORTS ,{
See Also=dll.h/DLL_INTERFACE, dll.h/_DLL_entry

[Description]
Exports symbols from the DLL.

[Explanation]
The DLL_EXPORTS macro is used for defining the list of symbols which will be exported from the DLL.
Note that just putting a symbol declaration or a function prototype into the DLL interface
section does not mean that this symbol or function will automatically be exported: you need to
put the names of all objects which should be exported after the DLL_EXPORTS interface item.
<BR><BR>
DLL_EXPORTS must be followed by a list of symbols which should be exported from the DLL.
It is possible to exports function names, array names, or addresses of global variables (i.e.
names of global variables preceded by the address operator <CODE>'&amp;'</CODE>). More precisely,
all types of pointers may be exported; functions and arrays are always referenced automatically.
For example, suppose that the interface section contains the following declarations:
<PRE>int foofunc (int fooarg1, const char *fooarg2);
char foostring [] = "Foo";
int fooarray [5] = {1, 2, 3, 4, 5};
unsigned short fooglbvar;
</PRE>
Then, to export these symbols from the DLL, use:
<PRE>DLL_EXPORTS foofunc, foostring, fooarray, &amp;fooglbvar
</PRE>
Each item in the DLL_EXPORTS declaration is assigned an index number, which is important later for
importing symbols from the DLL (see <A HREF="$$LINK(dll.h/_DLL_call)">_DLL_call</A>, <A HREF="$$LINK(dll.h/_DLL_call_attr)">_DLL_call_attr</A>, <A HREF="$$LINK(dll.h/_DLL_reference)">_DLL_reference</A>, and
<A HREF="$$LINK(dll.h/_DLL_glbvar)">_DLL_glbvar</A> for info about how to import symbols from the DLL). The first item gets the
index number 0, the second gets the index number 1, etc. So, in the above example, <I>foofunc</I>,
<I>foostring</I>, <I>fooarray</I>, and <I>fooglbvar</I> get the index numbers 0, 1, 2, and 3, respectively.
<BR><BR>
DLL_EXPORTS must appear at the very end of the DLL interface section, just after the
<A HREF="$$LINK(dll.h/DLL_VERSION)">DLL_VERSION</A> entry, and just before the <A HREF="$$LINK(dll.h/DLL_IMPLEMENTATION)">DLL_IMPLEMENTATION</A> delimiter, which terminates the
DLL interface section and starts the implementation section. See <A HREF="$$LINK(dll.h/DLL_INTERFACE)">DLL_INTERFACE</A> for a detailed
layout of the DLL interface structure.
