Question

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 the 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 ?

Was it helpful?

Solution

dlsym() can return address of variables -- there is even an example in POSIX doc. I don't what is the equivalent for Windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top