From e445b4a2d35b028f067457af3ae0951eb253e46b Mon Sep 17 00:00:00 2001 From: Olivier Azeau Date: Fri, 10 May 2024 16:02:08 +0200 Subject: [PATCH] Load 32 bits or 64 bits FMU according to current process (Is64BitProcess) instead of OS architecture (Is64BitOperatingSystem) As a consequence, it should be possible to load 32 bits FMUs on 64 bits OSes - but the whole process must be 32 bits, not just the FMU. --- src/Femyou.csproj | 2 +- src/internal/Library.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Femyou.csproj b/src/Femyou.csproj index ce9da6d..c41f095 100644 --- a/src/Femyou.csproj +++ b/src/Femyou.csproj @@ -12,7 +12,7 @@ Copyright © Olivier Azeau netstandard2.1 - 0.1.2 + 0.1.3 diff --git a/src/internal/Library.cs b/src/internal/Library.cs index 895f08d..9d1dc6c 100644 --- a/src/internal/Library.cs +++ b/src/internal/Library.cs @@ -1,12 +1,16 @@ using System; -using System.IO; using NativeLibraryLoader; namespace Femyou { class Library : IDisposable { - public Library(string baseFolder, string name) : this(Platform.GetLibraryPath(Environment.OSVersion.Platform,Environment.Is64BitOperatingSystem,baseFolder,name)) + public Library(string baseFolder, string name) + : this(Platform.GetLibraryPath( + Environment.OSVersion.Platform, + Environment.Is64BitProcess, + baseFolder, + name)) { }