Hello all.

Some time ago, when I was testing standard USER controls with the new unicode
stuff, I encountered the following problem not related to controls at all.

One of my test applications is Adobe PageMaker 6.5. It loads its plugins and
initializes menu with strings loaded from the plugin module resources and
describes functionality of that plugin. Currently menu has only garbage.

Investigation showed, that PM loads module with LOAD_LIBRARY_AS_DATAFILE and
then does LoadStringA to retrieve needed data. The problem is that affected
module has file alignment 0x200 and all resource functions in Wine use
VirtualAddress instead of PointerToRawData.

Moreover, currently there is no way in Wine to distinguish module loaded normally
from module loaded as data file. Quick test in Win2000 shows that if no flags are
specified, module gets loaded at address as in headers, if LOAD_LIBRARY_AS_DATAFILE
is specified, module gets loaded at arbitrary base address and returned to application
hModule is incremented by 1.

I'll just not dare to fix this issue myself because too many places in Wine should
be correctly addressed, but I'm not expert in the Wine PE loader.




Reply via email to