views:

104

answers:

2

i need to deploy an application with a DLL in the application's directory for users on Windows 2000. The dll was shipped with Windows XP an later as a system dll.

Windows XP was also when Microsoft introduced the Fusion loader, to resolve assembly dependancies.

Is it possible to instruct to not use the version of the dll in my folder, but instead to always use the latest version of system supplied version of that dll? And Windows 2000 doesn't have the Fusion loader, nor the dll, so it will just use the version in my folder?

A: 

On Windows 2000, if the DLL isn't in the app folder, it will walk down the standard DLL load path (i.e. similar to how $PATH works). What your app does on XP depends on whether you've got an App Manifest (i.e. whether you specify a version or not).

Paul Betts
Is what XP does depending on whether i've not an App Manifest, useful towards solving my problem?
Ian Boyd
A: 

It is not possible on Windows. DLLs from the current directory are always loading first. I could only suggest you to modify your application in a way it loads the DLL dynamically then it will be possible to alter LoadLibrary path or to specify the exactly path to the DLL

Moisei