32-bit dlls in 64-bit process

Viktor Semykin thesame.ml at gmail.com
Mon Mar 20 20:50:54 CDT 2017


Hello.

I'm trying to run Adobe Photoshop Lightroom using Wine. One of the 
showstoppers was the fact that 64-bit process of Lightroom is loading 
32-bit DLLs containing various resources. While Windows allows it [1 
<https://support.microsoft.com/en-us/help/282423/list-of-limitations-in-64-bit-windows>] 
wine does not.

I made this simple change to Wine code just to make it work for my local 
usecase:

> --- a/server/mapping.c
> +++ b/server/mapping.c
> @@ -414,8 +414,6 @@ static unsigned int get_image_params( struct 
> mapping *mapping, file_pos_t file_s
>          if (nt.opt.hdr32.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC) 
> return STATUS_INVALID_IMAGE_FORMAT;
>          break;
>      case CPU_x86_64:
> -        if (nt.FileHeader.Machine != IMAGE_FILE_MACHINE_AMD64) return 
> STATUS_INVALID_IMAGE_FORMAT;
> -        if (nt.opt.hdr64.Magic != IMAGE_NT_OPTIONAL_HDR64_MAGIC) 
> return STATUS_INVALID_IMAGE_FORMAT;
>          break;
>      case CPU_POWERPC:
>          if (nt.FileHeader.Machine != IMAGE_FILE_MACHINE_POWERPC) 
> return STATUS_INVALID_IMAGE_FORMAT;

 From what I can tell this change looks neigher neat nor correct.

My question is, what is /the/ correct way to allow loading 32-bit dll 
into 64-bit process just for loading its resources.

Thank you.

[1] 
https://support.microsoft.com/en-us/help/282423/list-of-limitations-in-64-bit-windows

-- 
best, Viktor.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20170320/5dc10792/attachment.html>


More information about the wine-devel mailing list