who may get defined variable in library
I read this site and have a doubt with C.
/*
* Declare and populate the module's data structure. The
* name of this structure ('tut1_module') is important - it
* must match the name of the module. This structure is the
* only "glue" between the httpd core and th开发者_C百科e module.
*/
module AP_MODULE_DECLARE_DATA tut1_module =
{
// Only one callback function is provided. Real
// modules will need to declare callback functions for
// server/directory configuration, configuration merging
// and other tasks.
STANDARD20_MODULE_STUFF,
NULL,
NULL,
NULL,
NULL,
NULL,
mod_tut1_register_hooks, /* callback for registering hooks */
};
In the section above I not know what apache get this variable. I know who get function pointer in C, using LoadLibrary/dlopen, GetProcAddress/dlsyn function. But never watch who one executable may get variable defined in library, anyone can help me in this doubt ?
dlsym()
can return address of variables -- there is even an example in POSIX doc. I don't what is the equivalent for Windows.
精彩评论