Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Nils12345678901234567 opened this issue Apr 29, 2024 · 2 comments
Closed

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

Nils12345678901234567 opened this issue Apr 29, 2024 · 2 comments

Comments

@Nils12345678901234567
Copy link

Nils12345678901234567 commented Apr 29, 2024

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:

public Library(string baseFolder, string name) : this(Platform.GetLibraryPath(Environment.OSVersion.Platform,Environment.Is64BitOperatingSystem,baseFolder,name))

@Oaz
Copy link
Owner

Oaz commented May 10, 2024

Fixed.
See this commit

@Oaz Oaz closed this as completed May 10, 2024
@Nils12345678901234567
Copy link
Author

Excellent !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants