Inconsistency/bug with GetProcAddress

Vitaliy Margolen wine-devel at kievinfo.com
Sun Aug 7 08:41:38 CDT 2005


Saturday, August 6, 2005, 11:24:05 PM, Mike McCormack wrote:

>> app1.exe: GetProcAddress(mKernel32, "LoadLibraryA") returns 0x404FCBCC
>> app2.exe: GetProcAddress(mKernel32, "LoadLibraryA") returns 0x404FFBCC

>> Is there are any reason why this is happening? Any ways to fix this?

> Under Windows 98, you will always get the same address for the same
> export from a dll, however that's not garanteed under Windows NT (or Wine).

> The problem is that mmap does not garantee that any specific area of 
> memory will be available, so we can't always load a library at the same 
> address.

> You could "fix" it for a specific dll by reserving a memory area using 
> the wine-preloader, but that would be a hack.

I think you missing the point. I'm not talking about separate runs of wine.
I'm talking about one instance with parent & child processes. I would assume
that each dll that has been loaded when parent started will have the same entry
points for the child process as well. Because kernel32 is not unloadeble it's
exports should always be in the same place guaranteed until the next reboot.

>> Unfortunately there are some programs that depend on address returned from
>> GetProcAddress being the same in parent and child processes.

> Which program depends upon that behaviour?  It's possible that some old
> Windows 98 copy protections schemes depend upon it, but they should work 
> if you change the version to win2k.
For now it's all safedisc protected games.

Vitaliy




More information about the wine-devel mailing list