a question about dll override?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Forth great Swim

a question about dll override?

Post by Forth great Swim »

I read the wine user guide. It says "After you've located a native DLL on a Windows system, you'll need to put it in suitable place for Wine to find it and then configure it to be used. Generally the place you need to put it is in the directory you've configured to be c:\windows\system32"I think I am confused, since c:\windows\system32 contains builtin dlls of wine, if I place the windows native dlls to this folder, they will just overwrite the existed builtin dlls. So after that how can I choose "Native then Builtin"? Anyone can help me with this question?
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
User avatar
dimesio
Moderator
Moderator
Posts: 13370
Joined: Tue Mar 25, 2008 10:30 pm

Re: a question about dll override?

Post by dimesio »

Forth great Swim wrote: since c:\windows\system32 contains builtin dlls of wine, if I place the windows native dlls to this folder, they will just overwrite the existed builtin dlls.
No. Those are just fake dlls for apps that refuse to run if they don't find a particular dll file in that location. Wine's builtin dlls are located in /usr/lib/wine.
Forth great Swim

a question about dll override?

Post by Forth great Swim »

Thanks a lot, I will try it. So since dlls in system32 are fake dlls, I want to know how wine makes builtin, native and these fake dlls work together, is there any material talks about this topic?
From: [email protected]
Date: Wed, 14 Apr 2010 11:21:02 -0500
To: [email protected]
Subject: [Wine] Re: a question about dll override?


Forth great Swim wrote:
since c:\windows\system32 contains builtin dlls of wine, if I place the windows native dlls to this folder, they will just overwrite the existed builtin dlls.
No. Those are just fake dlls for apps that refuse to run if they don't find a particular dll file in that location. Wine's builtin dlls are located in /usr/lib/wine.





_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Forth great Swim

a question about dll override?

Post by Forth great Swim »

I have tried to replace all dlls in wine's system32 with windowx xp dlls. And the winecfg can not run. seems the dlls in wine's system32 directory are not just fake dlls. If anyone could give me some explanation? I feel I am so confused with the dlls override.
From: [email protected]
Date: Wed, 14 Apr 2010 11:21:02 -0500
To: [email protected]
Subject: [Wine] Re: a question about dll override?


Forth great Swim wrote:
since c:\windows\system32 contains builtin dlls of wine, if I place the windows native dlls to this folder, they will just overwrite the existed builtin dlls.
No. Those are just fake dlls for apps that refuse to run if they don't find a particular dll file in that location. Wine's builtin dlls are located in /usr/lib/wine.





_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
User avatar
dimesio
Moderator
Moderator
Posts: 13370
Joined: Tue Mar 25, 2008 10:30 pm

Re: a question about dll override?

Post by dimesio »

Forth great Swim wrote:I have tried to replace all dlls in wine's system32 with windowx xp dlls.
Who told you to do that? Some dlls should never be overridden, and you should only override dlls as needed. Replacing all of them, as you've discovered, will break Wine.

Delete ~/.wine and start over.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Re: a question about dll override?

Post by DaVince »

Forth great Swim wrote:I have tried to replace all dlls in wine's system32 with windowx xp dlls. And the winecfg can not run. seems the dlls in wine's system32 directory are not just fake dlls. If anyone could give me some explanation? I feel I am so confused with the dlls override.
The fake DLLs just redirect everything to the place that contains the real DLLs, I believe. This means that if you overwrite them, they won't do that but try to use the DLL you copied over instead.
hellork
Level 3
Level 3
Posts: 82
Joined: Thu Mar 27, 2008 7:13 pm

Re: a question about dll override?

Post by hellork »

Forth great Swim wrote:I have tried to replace all dlls in wine's system32 with windowx xp dlls. And the winecfg can not run. seems the dlls in wine's system32 directory are not just fake dlls. If anyone could give me some explanation? I feel I am so confused with the dlls override.
The dlls are quite fake. Even the larger ones contain no export table and a miniscule 5 bytes of code. But they do contain resources, that is icons.

Code: Select all

winedump user32.dll
  size of code                       0x5            5
...
Data Directory
  EXPORT       rva: 0x0         size: 0x0
...
  RESOURCE     rva: 0x3000      size: 0x11bcc
That said, it is kind of a mystery why winecfg will not run when you replace certain fake DLLs. Is there some kind of automatic override going on?
My suggestion is don't put dlls into system32. Take only the dlls you need to override and put them into the individual program's folder.

There's lots of links about wine's fake dlls. Here's a couple I found.
http://wiki.jswindle.com/index.php/Dcom98
http://www.pubbs.net/201003/wine/20019- ... e-dll.html
James McKenzie

a question about dll override?

Post by James McKenzie »

hellork wrote:
Forth great Swim wrote:
I have tried to replace all dlls in wine's system32 with windowx xp dlls. And the winecfg can not run. seems the dlls in wine's system32 directory are not just fake dlls. If anyone could give me some explanation? I feel I am so confused with the dlls override.
Place the real dlls in the directory of the program that is asking for
them. NEVER replace the 'core' dlls for Wine.

What is the problem that you have where you need to use native dlls.

James McKenzie
Locked