Subject | Re: [firebird-support] FB1.5 Win32 Installer - Possible Error |
---|---|
Author | Helen Borrie |
Post date | 2003-11-19T00:02:13Z |
At 11:23 PM 18/11/2003 +0000, you wrote:
file being redirected to use a local file called editor.exe, rather than
the text editor in the system directory. The rest is about DLLs.
Furthermore, LoadLibrary calls don't apply to exe files.
IOW, the kit-builders' interpretation is spot-on.
============================================
Dynamic-Link Library Redirection
Problems can occur when an application loads a version of a DLL other than
the one with which it shipped. Starting with Windows 2000, you can ensure
that your application uses the correct version of a DLL by creating a
redirection file. The contents of a redirection file are ignored, but its
presence forces all DLLs in the application's directory to be loaded from
that directory.
The redirection file must be named as follows: appname.local.
For example, if the application's name is editor.exe, the redirection file
is named editor.exe.local. You must install editor.exe.local in the same
directory that contains editor.exe. You must also install the DLLs in the
same directory.
The LoadLibrary and LoadLibraryEx functions change their search sequence if
a redirection file is present. If a path is specified and there is a
redirection file for the application, these functions search for the DLL in
the application's directory. If the DLL exists in the application's
directory, these functions ignore the specified path and load the DLL from
the application's directory. If the module is not in the application's
directory, these functions load the DLL from the specified directory.
For example, an application c:\myapp\myapp.exe calls LoadLibrary using the
following path:
c:\program files\common files\system\mydll.dll
If c:\myapp\myapp.exe.local and c:\myapp\mydll.dll exist, LoadLibrary will
load c:\myapp\mydll.dll. Otherwise, LoadLibrary will load
c:\program files\common files\system\mydll.dll.
Note It is good practice to install your application's DLLs in the same
directory that contains the application, even if you are not using
redirection. It ensures that installing your application will not overwrite
other copies of the DLL and cause other applications to fail. In addition,
other applications will not overwrite your copy of the DLL and cause your
application to fail.
============================================
heLen
>My reading of the MS documentation suggests there is an error inWhy? fbserver.exe is not a Windows system file.
>the new scripts. (Of course I may be wrong.)
>
>To ensure that the installed dlls are used rather than ones found
>from the system directory, there are some zero length ".local"
>files, one for each dll.
>
>I think they should be tied to the exe files not the dlls. For
>instance I think there should be a fbserver.exe.local file.
>Source information is here:For a complete re-read, here's the text. There is *one* example of an exe
>
>http://msdn.microsoft.com/library/en-
>us/dllproc/base/dynamic_link_library_redirection.asp
file being redirected to use a local file called editor.exe, rather than
the text editor in the system directory. The rest is about DLLs.
Furthermore, LoadLibrary calls don't apply to exe files.
IOW, the kit-builders' interpretation is spot-on.
============================================
Dynamic-Link Library Redirection
Problems can occur when an application loads a version of a DLL other than
the one with which it shipped. Starting with Windows 2000, you can ensure
that your application uses the correct version of a DLL by creating a
redirection file. The contents of a redirection file are ignored, but its
presence forces all DLLs in the application's directory to be loaded from
that directory.
The redirection file must be named as follows: appname.local.
For example, if the application's name is editor.exe, the redirection file
is named editor.exe.local. You must install editor.exe.local in the same
directory that contains editor.exe. You must also install the DLLs in the
same directory.
The LoadLibrary and LoadLibraryEx functions change their search sequence if
a redirection file is present. If a path is specified and there is a
redirection file for the application, these functions search for the DLL in
the application's directory. If the DLL exists in the application's
directory, these functions ignore the specified path and load the DLL from
the application's directory. If the module is not in the application's
directory, these functions load the DLL from the specified directory.
For example, an application c:\myapp\myapp.exe calls LoadLibrary using the
following path:
c:\program files\common files\system\mydll.dll
If c:\myapp\myapp.exe.local and c:\myapp\mydll.dll exist, LoadLibrary will
load c:\myapp\mydll.dll. Otherwise, LoadLibrary will load
c:\program files\common files\system\mydll.dll.
Note It is good practice to install your application's DLLs in the same
directory that contains the application, even if you are not using
redirection. It ensures that installing your application will not overwrite
other copies of the DLL and cause other applications to fail. In addition,
other applications will not overwrite your copy of the DLL and cause your
application to fail.
============================================
heLen