Advice please. adding a MODULE_LoadLibraryExA argument

Bill Medland medbi01 at accpac.com
Tue Aug 14 11:43:32 CDT 2001


I'd appreciate advice on this.

I am looking at adding the handling of LoadLibraryExA
(..LOAD_WITH_ALTERED_SEARCH_PATH) (which we use) and I am wondering about
how to carry around the library directory during the recursion on
MODULE_LoadLibraryExA.

The easiest way is to put it in a static variable (ok, some allocated
memory pointed to by a static variable) and depend upon the existing
critical sections (which I don't understand particularly) to ensure it is
only used by the currently loading tree of DLLS (i.e. set it up after the
RtlAcquirePebLock in MODULE_LoadLibraryExA).  However I dislike using
static variables as a matter of principle.

The way I would prefer would be to add an argument to all the functions in
the recursion and use that to carry the name around.
  MODULE_LoadLibraryExA
  PE_LoadLibraryExA
  ELF_LoadLibraryExA
  PE_CreateModule
  fixup_imports

Any objections?

Bill





More information about the wine-devel mailing list