Oaz / Femyou

loading and running fmi-standard FMUs in dotnet core
MIT License
15 stars 5 forks source link

Not posible to load 32-bit FMU on 64 bit Windows #4

Closed Nils12345678901234567 closed 4 months ago

Nils12345678901234567 commented 4 months ago

The library only tries to load 64-bit DLLs on 64 bit Windows, but it is possible to run both 32-bit and 64 bit code on Windows. The library should check if the current process is 32 bit or 64 bit

https://stackoverflow.com/a/1953411/1688642

if (IntPtr.Size == 4)
{
    // 32-bit
}
else if (IntPtr.Size == 8)
{
    // 64-bit
}

The issus is in the constructor of the Librarys class: https://github.com/Oaz/Femyou/blob/56c94bbd6be2278770018817eb08b640d448dbc6/src/internal/Library.cs#L9

Oaz commented 4 months ago

Fixed. See this commit

Nils12345678901234567 commented 4 months ago

Excellent !