http://bugs.winehq.org/show_bug.cgi?id=5294
------- Additional Comments From dmitry@codeweavers.com 2007-15-05 10:00 -------
Due to the way wine implements the LOAD_LIBRARY_AS_DATAFILE flag, it fails. The dll is mapped as "data file" into memory (receives its own base address).
...
To work around this problem, LOAD_LIBRARY_AS_DATAFILE shall not use load_library_as_datafile() (CreateFileMappingW/MapViewOfFile).
But Windows really just maps the file without performing any initialization steps for LOAD_LIBRARY_AS_DATAFILE. There should be something else that causes a problem. Is the dll already loaded at that point? Perhaps in that case LoadLibrary(LOAD_LIBRARY_AS_DATAFILE) supposed to behave differently?