On Thu, 21 Jun 2007 09:14:34 -0400, Nassar, Anthony <[EMAIL PROTECTED]> wrote:

>I did *not* want to outsource that logic to the
>CLR, let alone to the registry.

But there's no logic, except that 32-bit processes should load 32-bit DLLs,
and 64-bit processes should load 64-bit DLLs.  I don't see any reason why
this logic should be in my code and not in the OS or the CLR.

Regards,

Ron


>
>-----Original Message-----
>From: Discussion of advanced .NET topics.
>[mailto:[EMAIL PROTECTED] On Behalf Of Ron Inbar
>Sent: Tuesday, June 19, 2007 3:39 PM
>To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
>Subject: [ADVANCED-DOTNET] Loading 32/64-bit unmanaged DLLs
>
>Hi,
>
>I want to compile my managed assemblies (both DLLs and EXEs) as AnyCPU.
>I have a small number of unmanaged DLLs, for some of which I have both a
>32-bit version and a 64-bit version, and for others I only have a 32-bit
>version.
>Obviously, applications that load DLLs of the latter kind must be
>compiled as x86 to make them run as 32-bit processes on 64-bit systems.
>Regarding the former kind, I would still like to use AnyCPU rather than
>compile them twice.
>I found one way to do this, which is to put the 64-bit unmanaged DLLs
>under
>%windir%\system32 and their 32-bit equivalents under %windir%\syswow64,
>and let WoW64's redirection mechanism take care of loading the right
>DLL.
>However, I would like to restrict my installation scripts to my own
>directories and not put anything under %windir%.
>Is there a way to use registry redirection to achieve a similar behavior
>with directories other than %windir%\system32?
>
>===================================
>This list is hosted by DevelopMentorĀ®  http://www.develop.com
>
>View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to