Fixed FormatMessage[A|16] against some buffer overflow cases.
[wine.git] / documentation / dll-overrides
blob16a85096d5b36e778443f5390e27d3a9812a26dc
1 DLL overrides
2 -------------
3    
4    The wine.conf directives [DllDefaults] and [DllOverrides] are the
5    subject of some confusion. The overall purpose of most of these
6    directives are clear enough, though - given a choice, should Wine use
7    its own built-in DLLs, or should it use .DLL files found in an
8    existing Windows installation? This document explains how this feature
9    works.
10    
11 DLL types
13    native
14           A "native" DLL is a .DLL file written for the real Microsoft
15           Windows.
16           
17    builtin
18           A "builtin" DLL is a Wine DLL. These can either be a part of
19           libwine.so, or more recently, in a special .so file that Wine
20           is able to load on demand.
21           
22    elfdll
23           An "elfdll" is a Wine .so file with a special Windows-like file
24           structure that is as close to Windows as possible, and that can
25           also seamlessly link dynamically with "native" DLLs, by using
26           special ELF loader and linker tricks. Bertho Stultiens did some
27           work on this, but this feature has not yet been merged back
28           into Wine (because of political reasons and lack of time), so
29           this DLL type does not exist in the official Wine at this time.
30           In the meantime, the "builtin" DLL type gained some of the
31           features of elfdlls (such as dynamic loading), so it's possible
32           that "elfdll" functionality will be folded into "builtin" at
33           some point.
34           
35    so
36           A native Unix .so file, with calling convention conversion
37           thunks generated on the fly as the library is loaded. This is
38           mostly useful for libraries such as "glide" that has exactly
39           the same API on both Windows and Unix.
40           
41 The [DllDefaults] section
43    EXTRA_LD_LIBRARY_PATH
44           This specifies the location of the Wine's DLL .so files. Wine
45           will search this path when trying to locate a DLL of the type
46           "builtin" or "elfdll". (This does not apply to libwine.so,
47           since libwine.so is not a DLL in this sense.)
48           
49    DefaultLoadOrder
50           This specifies in what order Wine should search for available
51           DLL types, if the DLL in question was not found in the
52           [DllOverrides] section.
53           
54 The [DllPairs] section
56    At one time, there was a section called [DllPairs] in the default
57    configuration file, but this has been obsoleted because the pairing
58    information has now been embedded into Wine itself. (The purpose of
59    this section was merely to be able to issue warnings if the user
60    attempted to pair codependent 16-bit/32-bit DLLs of different types.)
61    If you still have this in your wine.conf or .winerc, you may safely
62    delete it.
63    
64 The [DllOverrides] section
66    This section specifies how you want specific DLLs to be handled, in
67    particular whether you want to use "native" DLLs or not, if you have
68    some from a real Windows configuration. Because builtins do not mix
69    seamlessly with native DLLs yet, certain DLL dependencies may be
70    problematic, but workarounds exist in Wine for many popular DLL
71    configurations. Also see WWN's [16]Status Page to figure out how well
72    your favorite DLL is implemented in Wine.
73    
74    It is of course also possible to override these settings by explictly
75    using Wine's --dll command-line option (see the man page for details).
76    
77    Some hints for choosing your optimal configuration (listed by
78    16/32-bit DLL pair):
79    
80    krnl386, kernel32
81           Native versions of these will never work, so don't try. Leave
82           at builtin.
83           
84    gdi, gdi32
85           Graphics Device Interface. No effort has been made at trying to
86           run native GDI. Leave at builtin.
87           
88    user, user32
89           Window management and standard controls. It was possible to use
90           Win95's native versions at some point (if all other DLLs that
91           depend on it, such as comctl32 and comdlg32, were also run
92           native). However, this is no longer possible after the Address
93           Space Separation, so leave at builtin.
94           
95    ntdll
96           NT kernel API. Although badly documented, the native version of
97           this will never work. Leave at builtin.
98           
99    w32skrnl
100           Win32s (for Win3.x). Native version will probably never work.
101           Leave at builtin.
102           
103    wow32
104           Win16 support library for NT. Native version will probably
105           never work. Leave at builtin.
106           
107    system
108           Win16 kernel stuff. Will never work native. Leave at builtin.
109           
110    display
111           Display driver. Definitely leave at builtin.
112           
113    toolhelp
114           Tool helper routines. This is rarely a source of problems.
115           Leave at builtin.
116           
117    ver, version
118           Versioning. Seldom useful to mess with.
119           
120    advapi32
121           Registry and security features. Trying the native version of
122           this may or may not work.
123           
124    commdlg, comdlg32
125           Common Dialogs, such as color picker, font dialog, print
126           dialog, open/save dialog, etc. It is safe to try native.
127           
128    commctrl, comctl32
129           Common Controls. This is toolbars, status bars, list controls,
130           the works. It is safe to try native.
131           
132    shell, shell32
133           Shell interface (desktop, filesystem, etc). Being one of the
134           most undocumented pieces of Windows, you may have luck with the
135           native version, should you need it.
136           
137    winsock, wsock32
138           Windows Sockets. The native version will not work under Wine,
139           so leave at builtin.
140           
141    icmp
142           ICMP routines for wsock32. As with wsock32, leave at builtin.
143           
144    mpr
145           The native version may not work due to thunking issues. Leave
146           at builtin.
147           
148    lzexpand, lz32
149           Lempel-Ziv decompression. Wine's builtin version ought to work
150           fine.
151           
152    winaspi, wnaspi32
153           Advanced SCSI Peripheral Interface. The native version will
154           probably never work. Leave at builtin.
155           
156    crtdll
157           C Runtime library. The native version will easily work better
158           than Wine's on this one.
159           
160    winspool.drv
161           Printer spooler. You are not likely to have more luck with the
162           native version.
163           
164    ddraw
165           DirectDraw/Direct3D. Since Wine does not implement the DirectX
166           HAL, the native version will not work at this time.
167           
168    dinput
169           DirectInput. Running this native may or may not work.
170           
171    dsound
172           DirectSound. It may be possible to run this native, but don't
173           count on it.
174           
175    dplay/dplayx
176           DirectPlay. Native ought to work best on this, if at all.
177           
178    mmsystem, winmm
179           Multimedia system. The native version is not likely to work.
180           Leave at builtin.
181           
182    msacm, msacm32
183           Audio Compression Manager. Builtin works best, if you set
184           msacm.drv to the same.
185           
186    msvideo, msvfw32
187           Video for Windows. It is safe (and recommended) to try native.
188           
189    mcicda.drv
190           CD Audio MCI driver.
191           
192    mciseq.drv
193           MIDI Sequencer MCI driver (.MID playback).
194           
195    mciwave.drv
196           Wave audio MCI driver (.WAV playback).
197           
198    mciavi.drv
199           AVI MCI driver (.AVI video playback). Best to use native.
200           
201    mcianim.drv
202           Animation MCI driver.
203           
204    msacm.drv
205           Audio Compression Manager. Set to same as msacm32.
206           
207    midimap.drv
208           MIDI Mapper.
209           
210    wprocs
211           This is a pseudo-DLL used by Wine for thunking purposes. A
212           native version of this doesn't exist.
213           
214    Have fun...
215    
216                                                               - Ove Kåven