@@ -21,7 +21,7 @@ <H1 ALIGN="CENTER">Module mod_so</H1>
2121< P > < A
2222HREF ="module-dict.html#Status "
2323REL ="Help "
24- > < STRONG > Status:</ STRONG > </ A > Base (Windows); Experimental (Unix)
24+ > < STRONG > Status:</ STRONG > </ A > Base (Windows); Optional (Unix)
2525< BR >
2626< A
2727HREF ="module-dict.html#SourceFile "
@@ -42,30 +42,38 @@ <H1 ALIGN="CENTER">Module mod_so</H1>
4242
4343< H2 > Summary</ H2 >
4444
45- < p > This is an experimental module. On selected operating systems it
46- can be used to load modules into Apache at runtime via the < A
47- HREF ="../dso.html "> Dynamic Shared Object</ A > (DSO) mechanism, rather
48- than requiring a recompilation.
45+ < P > On selected operating systems this module can be used to load modules
46+ into Apache at runtime via the < A HREF ="../dso.html "> Dynamic Shared
47+ Object</ A > (DSO) mechanism, rather than requiring a recompilation.
4948
5049< P >
5150On Unix, the loaded code typically comes from shared object files
52- (usually with < SAMP > .so</ SAMP > extension), whilst on Windows this
53- module loads < SAMP > DLL</ SAMP > files. This module is only available in
54- Apache 1.3 and up.
55-
51+ (usually with < SAMP > .so</ SAMP > extension), on Windows this may either
52+ the < SAMP > .so</ SAMP > or < SAMP > .dll</ SAMP > extension. This module is
53+ only available in Apache 1.3 and up.
5654
5755< p > In previous releases, the functionality of this module was provided
5856for Unix by mod_dld, and for Windows by mod_dll. On Windows, mod_dll
5957was used in beta release 1.3b1 through 1.3b5. mod_so combines these
6058two modules into a single module for all operating systems.
6159
60+ < P > < STRONG > Warning: Apache 1.3 modules cannot be directly used with
61+ Apache 2.0 - the module must be modified to dynamically load or
62+ compile into Apache 2.0</ STRONG > .</ P >
63+
6264< H2 > Directives</ H2 >
6365< UL >
6466< LI > < A HREF ="#loadfile "> LoadFile</ A >
6567< LI > < A HREF ="#loadmodule "> LoadModule</ A >
6668</ UL >
6769
68- < H2 > < A NAME ="creating "> Creating DLL Modules for Windows</ A > </ H2 >
70+ < H2 > < A NAME ="creating "> Creating Loadable Modules for Windows</ A > </ H2 >
71+
72+ < P > < STRONG > Note: the module name format changed for Windows with Apache
73+ 1.3.15 and 2.0 - the modules are now named as mod_foo.so</ STRONG > .
74+ While mod_so still loads modules with ApacheModuleFoo.dll names, the
75+ new naming convention is preferred; if you are converting your loadable
76+ module for 2.0, please fix the name to this 2.0 convention.</ P >
6977
7078< P > The Apache module API is unchanged between the Unix and Windows
7179 versions. Many modules will run on Windows with no or little change
@@ -87,27 +95,30 @@ <H2><A NAME="creating">Creating DLL Modules for Windows</A></H2>
8795
8896< P > To create a module DLL, a small change is necessary to the module's
8997 source file: The module record must be exported from the DLL (which
90- will be created later; see below). To do this, add the
91- < CODE > MODULE_VAR_EXPORT </ CODE > (defined in the Apache header files) to
92- your module's module record definition. For example, if your module
98+ will be created later; see below). To do this, add the < CODE
99+ > AP_MODULE_DECLARE_DATA </ CODE > (defined in the Apache header files)
100+ to your module's module record definition. For example, if your module
93101 has:</ P >
94102< PRE >
95103 module foo_module;
96104</ PRE >
97105< P > Replace the above with:</ P >
98106< PRE >
99- module MODULE_VAR_EXPORT foo_module;
107+ module AP_MODULE_DECLARE_DATA foo_module;
100108</ PRE >
101109< P > Note that this will only be activated on Windows, so the module can
102110 continue to be used, unchanged, with Unix if needed. Also, if you are
103111 familiar with < CODE > .DEF</ CODE > files, you can export the module
104112 record with that method instead.</ P >
105113
106114< P > Now, create a DLL containing your module. You will need to link this
107- against the ApacheCore .lib export library that is created when the
108- ApacheCore .dll shared library is compiled. You may also have to change
115+ against the libhttpd .lib export library that is created when the
116+ libhttpd .dll shared library is compiled. You may also have to change
109117 the compiler settings to ensure that the Apache header files are
110- correctly located.</ P >
118+ correctly located. You can find this library in your server root's
119+ libexec directory. It is best to grab an existing module .dsp file
120+ from the tree to assure the build environment is configured correctly,
121+ or alternately compare the compiler and link options to your .dsp.</ P >
111122
112123< P > This should create a DLL version of your module. Now simply place it
113124 in the < SAMP > modules</ SAMP > directory of your server root, and use
@@ -166,20 +177,13 @@ <H2><A NAME="loadmodule">LoadModule</A> directive</H2>
166177to the list of active modules. < EM > Module</ EM > is the name of the
167178external variable of type < CODE > module</ CODE > in the file, and is
168179listed as the < a href ="module-dict.html#ModuleIdentifier "> Module
169- Identifier</ a > in the module documentation. Example (Unix) :
180+ Identifier</ a > in the module documentation. Example:
170181< BLOCKQUOTE > < CODE >
171182LoadModule status_module modules/mod_status.so
172183</ CODE > </ BLOCKQUOTE >
173184
174- < P >
175-
176- Example (Windows):
177- < BLOCKQUOTE > < CODE >
178- LoadModule status_module modules/ApacheModuleStatus.dll< BR >
179- </ CODE > </ BLOCKQUOTE >
180-
181- loads the named module from the modules subdirectory of the
182- ServerRoot.< P >
185+ < P > loads the named module from the modules subdirectory of the
186+ ServerRoot.< P >
183187
184188
185189<!--#include virtual="footer.html" -->
0 commit comments