Bug 147092

Summary: Modify CLI libraries to support Any CPU mode
Product: LibreOffice Reporter: Sorin Boris <bsorin>
Component: sdkAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: ilmari.lauhakangas
Priority: medium    
Version: 7.1.3.2 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=144405
Whiteboard:
Crash report or crash signature: Regression By:

Description Sorin Boris 2022-01-31 15:26:48 UTC
Description:
I have written an application that launches Libre Office using the CLI libraries. The application is working fine. There is only one remark. In the application settings, I must specify Platform Target: x64. This is not very convenient for several reasons:
- The user's computer may not support this mode.
- the solution consists of several applications, one of which does not support x64 mode.
- there is no way to run from Libre Office or Open Office application, since Open Office only supports Any CPU mode.
I earnestly ask you to modify the CLI libraries so that they support the Any CPU mode.
Thank you.

Actual Results:
CLI libraries work only in mode x64

Expected Results:
CLI libraries work in mode Any CPU


Reproducible: Always


User Profile Reset: No



Additional Info:
I would like CLI libraries to work as well as in mode Any CPU
Comment 1 Sorin Boris 2022-02-15 12:06:53 UTC
I have written an application that launches Libre Office using the CLI libraries. The application is working fine. There is only one remark. In the application settings, I must specify Platform Target: x64. This is not very convenient for several reasons:
- The user's computer may not support this mode.
- the solution consists of several applications, one of which does not support x64 mode.
- there is no way to run from Libre Office or Open Office application, since Open Office only supports Any CPU mode.
I earnestly ask you to modify the CLI libraries so that they support the Any CPU mode.
Thank you.
Comment 2 Buovjaga 2022-12-12 16:16:32 UTC
I asked in the dev chat and got this comment:
I'm not sure I understand the request - if need be, they could simply use x86?

Sorin: what do you think?
Comment 3 Sorin Boris 2022-12-13 08:09:23 UTC
I don't think this is the best idea. If the user's computer supports x64 mode, then the full power of the computer is not used. Moreover, Open Office only supports Any CPU mode.
Comment 4 Kalle Niemitalo 2022-12-13 10:31:22 UTC
cli_cppuhelper.dll is compiled from C++/CLI, contains native code, and references CPU-specific DLLs (KERNEL32.dll, api-ms-win-crt-runtime-l1-1-0.dll, api-ms-win-crt-string-l1-1-0.dll, api-ms-win-crt-heap-l1-1-0.dll, VCRUNTIME140.dll, ADVAPI32.dll, MSVCP140.dll, mscoree.dll, cppu3.dll, cppuhelper3MSC.dll, sal3.dll).  I don't think it is feasible to make this support Any CPU.

However, it might be possible to provide a cli_cppuhelper.dll reference assembly for Any CPU, so that you'd at least be able to build your application for Any CPU, although you'd still have to make it load the correct CPU-specific cli_cppuhelper.dll at run time.
Comment 5 Kalle Niemitalo 2022-12-13 10:33:54 UTC
Could you clarify what you mean with "Open Office only supports Any CPU mode"?
Comment 6 QA Administrators 2023-06-12 03:11:35 UTC Comment hidden (obsolete)
Comment 7 Sorin Boris 2023-06-12 05:30:50 UTC
The error remains, but it is not relevant, since the application is created for x64 mode, and this suits users quite well.